diff --git a/src/Gui/Control.cpp b/src/Gui/Control.cpp index 522c4c21ba..11ca885cd4 100644 --- a/src/Gui/Control.cpp +++ b/src/Gui/Control.cpp @@ -109,6 +109,14 @@ void ControlSingleton::showDialog(Gui::TaskView::TaskDialog *dlg) } return; } + + // Since the caller sets up a modeless task panel, it indicates intension + // for prolonged editing. So disable auto transaction in the current call + // stack. + // Do this before showing the dialog because its open() function is called + // which may open a transaction but fails when auto transaction is still active. + App::AutoTransaction::setEnable(false); + Gui::DockWnd::ComboView* pcComboView = qobject_cast (Gui::DockWindowManager::instance()->getDockWindow("Combo View")); // should return the pointer to combo view @@ -148,11 +156,6 @@ void ControlSingleton::showDialog(Gui::TaskView::TaskDialog *dlg) dw->raise(); } } - - // Since the caller sets up a modeless task panel, it indicates intension - // for prolonged editing. So disable auto transaction in the current call - // stack. - App::AutoTransaction::setEnable(false); } QTabWidget* ControlSingleton::tabPanel() const