From 04bbfc6e07407a6f85da1536e3676783c0be5f58 Mon Sep 17 00:00:00 2001 From: PaddleStroke Date: Wed, 9 Jul 2025 11:12:40 +0200 Subject: [PATCH] Fix https://github.com/FreeCAD/FreeCAD/issues/21936 --- src/Mod/Part/Gui/TaskAttacher.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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) {