myDoc->CommitCommand();
}
+Model_Document::~Model_Document()
+{
+ if (!myDoc.IsNull())
+ {
+ myDoc->ClearUndos();
+ myDoc->ClearRedos();
+ }
+}
+
void Model_Document::setThis(DocumentPtr theDoc)
{
myObjs->setOwner(theDoc);
aSession->setCheckTransactions(false);
if (myObjs)
delete myObjs;
+ anOldDoc->ClearRedos();
+ anOldDoc->ClearUndos();
anOldDoc.Nullify();
myObjs = new Model_Objects(myDoc->Main()); // synchronization is inside
myObjs->setOwner(theThis);