diff --git a/src/Mod/Part/Gui/TaskAttacher.cpp b/src/Mod/Part/Gui/TaskAttacher.cpp index 74e8f7e484..aa4ba226d0 100644 --- a/src/Mod/Part/Gui/TaskAttacher.cpp +++ b/src/Mod/Part/Gui/TaskAttacher.cpp @@ -1242,9 +1242,6 @@ TaskDlgAttacher::~TaskDlgAttacher() if (accepted && onAccept) { onAccept(); } - else if (onReject) { - onReject(); - } }; //==== calls from the TaskView =============================================================== @@ -1307,6 +1304,10 @@ bool TaskDlgAttacher::accept() bool TaskDlgAttacher::reject() { + if (onReject) { + onReject(); + } + Gui::DocumentT doc(getDocumentName()); Gui::Document* document = doc.getDocument(); if (document) {