From 1e7929ba59ab4078701afa135f53cd50bac84209 Mon Sep 17 00:00:00 2001 From: wmayer Date: Fri, 5 Feb 2021 16:36:19 +0100 Subject: [PATCH] Gui: add virtual method 'closed' to TaskDialog that is called when deleting a dialog --- src/Gui/TaskView/TaskDialog.cpp | 5 +++++ src/Gui/TaskView/TaskDialog.h | 2 ++ src/Gui/TaskView/TaskView.cpp | 1 + 3 files changed, 8 insertions(+) diff --git a/src/Gui/TaskView/TaskDialog.cpp b/src/Gui/TaskView/TaskDialog.cpp index 75643b1837..e36279c843 100644 --- a/src/Gui/TaskView/TaskDialog.cpp +++ b/src/Gui/TaskView/TaskDialog.cpp @@ -79,6 +79,11 @@ void TaskDialog::open() } +void TaskDialog::closed() +{ + +} + void TaskDialog::clicked(int) { diff --git a/src/Gui/TaskView/TaskDialog.h b/src/Gui/TaskView/TaskDialog.h index e26bbc8fb8..51c44ba359 100644 --- a/src/Gui/TaskView/TaskDialog.h +++ b/src/Gui/TaskView/TaskDialog.h @@ -103,6 +103,8 @@ public: public: /// is called by the framework when the dialog is opened virtual void open(); + /// is called by the framework when the dialog is closed + virtual void closed(); /// is called by the framework if a button is clicked which has no accept or reject role virtual void clicked(int); /// is called by the framework if the dialog is accepted (Ok) diff --git a/src/Gui/TaskView/TaskView.cpp b/src/Gui/TaskView/TaskView.cpp index a6026d0552..456c411905 100644 --- a/src/Gui/TaskView/TaskView.cpp +++ b/src/Gui/TaskView/TaskView.cpp @@ -651,6 +651,7 @@ void TaskView::removeDialog(void) addTaskWatcher(); if (remove) { + remove->closed(); remove->emitDestructionSignal(); delete remove; }