// add it after all nested (otherwise the nested will be disabled)
CompositeFeaturePtr aCompositeAfter =
std::dynamic_pointer_cast<ModelAPI_CompositeFeature>(theAfterThis);
+ FeaturePtr anAfterThisSub = theAfterThis;
if (aCompositeAfter.get()) {
FeaturePtr aSub = aCompositeAfter;
do {
FeaturePtr aNext = myObjs->nextFeature(aSub);
if (!isSub(aCompositeAfter, aNext)) {
- theAfterThis = aSub;
+ anAfterThisSub = aSub;
break;
}
aSub = aNext;
} while (aSub.get());
}
- myObjs->moveFeature(theMoved, theAfterThis);
+ myObjs->moveFeature(theMoved, anAfterThisSub);
if (aCurrentUp) { // make the moved feature enabled or disabled due to the real status
setCurrentFeature(currentFeature(false), false);
- } else if (theAfterThis == currentFeature(false)) {
+ } else if (theAfterThis == currentFeature(false) || anAfterThisSub == currentFeature(false)) {
// must be after move to make enabled all features which are before theMoved
setCurrentFeature(theMoved, true);
}
aDump->execute();
}
bool isProblem = !aDump.get() || !aDump->error().empty(); // after "finish" dump will be removed
+ if (isProblem && aDump.get()) {
+ std::cout<<"Dump feature error "<<aDump->error()<<std::endl;
+ Events_InfoMessage anErrorMsg(std::string("checkPythonDump"), aDump->error());
+ anErrorMsg.send();
+ }
aSession->finishOperation();
- if (isProblem)
+ if (isProblem) {
return false; // something is wrong during dump
+ }
// map from document name to feature name to feature data
std::map<std::string, std::map<std::string, ModelHighAPI_FeatureStore> > aStore;