Gui: move disabling of auto transactions before the call of showing a task dialog
This is needed because a task dialog's open() function still fails to open a transaction when it checks for a pending transaction and auto transaction is still enabled.
This commit is contained in:
@@ -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::DockWnd::ComboView*>
|
||||
(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
|
||||
|
||||
Reference in New Issue
Block a user