#include <Events_Loop.h>
#include <Locale_Convert.h>
#include <ModelAPI_Events.h>
+#include <Config_Translator.h>
#include <GeomAPI_ShapeHierarchy.h>
#include <GeomAPI_ShapeIterator.h>
CompositeFeaturePtr aComposite =
std::dynamic_pointer_cast<ModelAPI_CompositeFeature>(theFeature);
if (aComposite) {
+ bool aHasSubError = false;
for (int i = 0, aSize = aComposite->numberOfSubs(); i < aSize; i++) {
FeaturePtr aSubFeature = aComposite->subFeature(i);
std::string aSubFeatureError = getFeatureError(aSubFeature);
if (!aSubFeatureError.empty()) {
anError = anError + " in " + aSubFeature->getKind() + ".\n" + aSubFeatureError;
+ aHasSubError = true;
break;
}
}
+ if (!aHasSubError) { // #24260: error not in the sub-features, but in the argument
+ if (aComposite->getKind() == "Sketch" &&
+ aComposite->selection("External")->isInvalid()) {
+ anError = Config_Translator::translate(aComposite->getKind(), "The sketch base plane \
+is invalid, please push 'Change sketch plane' button to reselect it.");
+ }
+ }
}
}
}
<source>Attribute "%1" is not initialized.</source>
<translation>Sélectionnez un plan pour l'esquisse</translation>
</message>
+ <name>Sketch</name>
+ <message>
+ <source>The sketch base plane is invalid, please push 'Change sketch plane' button to reselect it.</source>
+ <translation>Le plan de base de l'esquisse n'est pas valide, veuillez appuyer sur le bouton 'Changer le plan de'esquisse' pour le resélectionner.</translation>
+ </message>
</context>
<context>
<name>Sketch:DirX</name>