Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Command: disable auto transaction if triggering editing
Each command will create an App::AutoTransaction to auto create and commit a transaction for proper undo/redo. But if the command starts editing, the current transaction may be required to out live the current command. Note that the command can only detect editing if the code calls Gui::Document::setEdit(). There are objects that starts editing by calling its own ViewProvider::setEdit(), e.g. various TechDraw ViewProviders. In this case, to avoid auto committing, one can call App::Application::setActiveTransaction() with the second argument set to true, or call App::AutoTransaction::setEnable(false).
- Loading branch information
1 parent
78ce18a
commit d0ca893
Showing
3 changed files
with
14 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters