Gui: [skip ci] add option to automatically close task dialog if undo/redo was pressed

This commit is contained in:
wmayer
2021-02-12 17:42:49 +01:00
parent d4e8a5a384
commit 75dff5d947
3 changed files with 31 additions and 1 deletions

View File

@@ -532,12 +532,22 @@ void TaskView::slotDeletedDocument()
void TaskView::slotUndoDocument(const App::Document&)
{
if (ActiveDialog && ActiveDialog->isAutoCloseOnTransactionChange()) {
ActiveDialog->autoClosedOnTransactionChange();
removeDialog();
}
if (!ActiveDialog)
updateWatcher();
}
void TaskView::slotRedoDocument(const App::Document&)
{
if (ActiveDialog && ActiveDialog->isAutoCloseOnTransactionChange()) {
ActiveDialog->autoClosedOnTransactionChange();
removeDialog();
}
if (!ActiveDialog)
updateWatcher();
}