return myTransactions.size() != myTransactionSave || isOperation();
}
-void Model_Document::clearUndos()
-{
- myDoc->ClearUndos();
- myTransactions.clear();
- myRedos.clear();
-}
-
bool Model_Document::canUndo()
{
// issue 406 : if transaction is opened, but nothing to undo behind, can not undo
MODEL_EXPORT virtual bool canUndo();
//! Undoes last operation
MODEL_EXPORT virtual void undo();
- //! Clean the undo list
- MODEL_EXPORT virtual void clearUndos();
//! Returns True if there are available Redo-s
MODEL_EXPORT virtual bool canRedo();
//! Redoes last operation
return ROOT_DOC->isModified();
}
-void Model_Session::clearUndos()
-{
- ROOT_DOC->clearUndos();
-}
-
bool Model_Session::canUndo()
{
return ROOT_DOC->canUndo();
MODEL_EXPORT virtual bool canUndo();
//! Undoes last operation
MODEL_EXPORT virtual void undo();
- //! Clean the undo list
- MODEL_EXPORT virtual void clearUndos();
//! Returns True if there are available Redos
MODEL_EXPORT virtual bool canRedo();
//! Redoes last operation
virtual bool canUndo() = 0;
//! Undoes last operation
virtual void undo() = 0;
- //! Clean the undo list
- virtual void clearUndos() = 0;
//! Returns True if there are available Redos
virtual bool canRedo() = 0;
//! Redoes last operation
}
ModelAPI_Session::get()->finishOperation();
- // issue #3044: clear undo/redo lists
- ModelAPI_Session::get()->clearUndos();
// to update data tree in the end of dumped script execution
ModelAPI_EventCreator::get()->sendReordered(FeaturePtr());
}