for (; aSubIter != aSubs.end(); aSubIter++)
subDoc(*aSubIter)->abortOperation();
// references may be changed because they are set in attributes on the fly
- myObjs->synchronizeFeatures(aDeltaLabels, true, false, isRoot());
+ myObjs->synchronizeFeatures(aDeltaLabels, true, false, false, isRoot());
}
bool Model_Document::isOperation() const
}
// after undo of all sub-documents to avoid updates on not-modified data (issue 370)
if (theSynchronize) {
- myObjs->synchronizeFeatures(aDeltaLabels, true, false, isRoot());
+ myObjs->synchronizeFeatures(aDeltaLabels, true, false, false, isRoot());
// update the current features status
setCurrentFeature(currentFeature(false), false);
}
subDoc(*aSubIter)->redo();
// after redo of all sub-documents to avoid updates on not-modified data (issue 370)
- myObjs->synchronizeFeatures(aDeltaLabels, true, false, isRoot());
+ myObjs->synchronizeFeatures(aDeltaLabels, true, false, false, isRoot());
// update the current features status
setCurrentFeature(currentFeature(false), false);
}
myDoc = theDoc;
// update all fields and recreate features and result objects if needed
TDF_LabelList aNoUpdated;
- synchronizeFeatures(aNoUpdated, true, true, true);
+ synchronizeFeatures(aNoUpdated, true, true, true, true);
myHistory.clear();
}
void Model_Objects::synchronizeFeatures(
const TDF_LabelList& theUpdated, const bool theUpdateReferences,
- const bool theOpen, const bool theFlush)
+ const bool theExecuteFeatures, const bool theOpen, const bool theFlush)
{
Model_Document* anOwner = std::dynamic_pointer_cast<Model_Document>(myDoc).get();
if (!anOwner) // this may happen on creation of document: nothing there, so nothing to synchronize
myHistory.clear();
}
- if (theOpen)
+ if (theExecuteFeatures)
anOwner->executeFeatures() = false;
aLoop->activateFlushes(isActive);
aLoop->flush(aRedispEvent);
aLoop->flush(aToHideEvent);
}
- if (theOpen)
+ if (theExecuteFeatures)
anOwner->executeFeatures() = true;
}
//! Synchronizes myFeatures list with the updated document
//! \param theUpdated list of labels that are marked as modified, so featrues must be also
//! \param theUpdateReferences causes the update of back-references
+ //! \param theExecuteFeatures requires re-execute modified persistent features
+ //! (not needed on undo/redo/abort/open)
//! \param theOpen - on open nothing must be reexecuted, except not persistent results
//! \param theFlush makes flush all events in the end of all modifications of this method
void synchronizeFeatures(const TDF_LabelList& theUpdated, const bool theUpdateReferences,
- const bool theOpen, const bool theFlush);
+ const bool theOpen, const bool theExecuteFeatures, const bool theFlush);
//! Synchronizes the BackReferences list in Data of Features and Results
void synchronizeBackRefs();
bool aWasChecked = myCheckTransactions;
setCheckTransactions(false);
TDF_LabelList anEmptyUpdated;
- aDoc->objects()->synchronizeFeatures(anEmptyUpdated, true, true, true);
+ aDoc->objects()->synchronizeFeatures(anEmptyUpdated, true, true, false, true);
if (aWasChecked)
setCheckTransactions(true);
}
TDF_CopyTool::Copy(aDS, aRT);
TDF_LabelList anEmptyUpdated;
- aNew->objects()->synchronizeFeatures(anEmptyUpdated, true, true, true);
+ aNew->objects()->synchronizeFeatures(anEmptyUpdated, true, true, true, true);
return aNew;
}