FreeCAD: master d0ca893b

Author Committer Branch Timestamp Parent
Zheng, Lei wmayer master 2019-08-12 00:05:06 master 78ce18ac
Changeset 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).
mod - src/App/Application.cpp Diff File
mod - src/Gui/Command.cpp Diff File
mod - src/Gui/Tree.cpp Diff File