// in transaction for nesting correct working
myDoc->NewCommand();
TDataStd_Integer::Set(myDoc->Main().Father(), 0);
+ // this to avoid creation of integer attribute outside the transaction after undo
+ transactionID();
myDoc->CommitCommand();
}
// close all only if it is really asked, otherwise it can be undoed/redoed
if (theForever) {
+ // flush everything to avoid messages with bad objects
delete myObjs;
myObjs = 0;
if (myDoc->CanClose() == CDM_CCS_OK)
subDoc(*aSubIter)->undoInternal(theWithSubs, theSynchronize);
}
}
- // after redo of all sub-documents to avoid updates on not-modified data (issue 370)
+ // after undo of all sub-documents to avoid updates on not-modified data (issue 370)
if (theSynchronize) {
myObjs->synchronizeFeatures(aDeltaLabels, true, isRoot());
// update the current features status
void Model_Document::moveFeature(FeaturePtr theMoved, FeaturePtr theAfterThis)
{
myObjs->moveFeature(theMoved, theAfterThis);
+ if (theAfterThis == currentFeature(true))
+ setCurrentFeature(theMoved, true);
}
void Model_Document::updateHistory(const std::shared_ptr<ModelAPI_Object> theObject)