return isSub(theMain, aParent);
}
-void Model_Document::moveFeature(FeaturePtr theMoved, FeaturePtr theAfterThis)
+void Model_Document::moveFeature(FeaturePtr theMoved, FeaturePtr theAfterThis, const bool theSplit)
{
bool aCurrentUp = theMoved == currentFeature(false);
if (aCurrentUp) {
}
myObjs->moveFeature(theMoved, anAfterThisSub);
+
+ if (theSplit) { // split the group into sub-features
+ theMoved->customAction("split");
+ }
+
if (aCurrentUp) { // make the moved feature enabled or disabled due to the real status
setCurrentFeature(currentFeature(false), 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);
}
+
+ if (theSplit) { // split the group into sub-features
+ theMoved->customAction("split");
+ }
}
void Model_Document::updateHistory(const std::shared_ptr<ModelAPI_Object> theObject)