From 410ded635c7e1797c5d441092693a13b811d4e9e Mon Sep 17 00:00:00 2001 From: "Zheng, Lei" Date: Sat, 15 Oct 2022 12:13:43 +0800 Subject: [PATCH] Gui: fix crash in DAGView when deleting object Fixes #587 --- src/Gui/CommandDoc.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Gui/CommandDoc.cpp b/src/Gui/CommandDoc.cpp index 1c3e7798097e..1920bad8b076 100644 --- a/src/Gui/CommandDoc.cpp +++ b/src/Gui/CommandDoc.cpp @@ -1417,7 +1417,12 @@ void StdCmdDelete::activated(int iMsg) return; } - SelectionPauseNotification slock; + // Some code (e.g. DAGView) assumes any selection changes refers to + // existing object, and will crash if not. So must not delay + // notification. + // + // SelectionPauseNotification slock; + App::TransactionLocker tlock; Gui::getMainWindow()->setUpdatesEnabled(false);