From b2823c78d1c53d598255061db9676ebe3e3da3ca Mon Sep 17 00:00:00 2001 From: PaddleStroke Date: Mon, 21 Oct 2024 14:15:58 +0200 Subject: [PATCH] Core: Fix Ctrl-deselection issue --- src/Gui/SoFCUnifiedSelection.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Gui/SoFCUnifiedSelection.cpp b/src/Gui/SoFCUnifiedSelection.cpp index 87d9202d3f..79d97c20d7 100644 --- a/src/Gui/SoFCUnifiedSelection.cpp +++ b/src/Gui/SoFCUnifiedSelection.cpp @@ -602,8 +602,10 @@ bool SoFCUnifiedSelection::setSelection(const std::vector &infos, bo std::string objectName = objname; if (ctrlDown) { - if (Gui::Selection().isSelected(docname, objname, info.element.c_str(), ResolveMode::NoResolve)) + if (Gui::Selection().isSelected(docname, objname, info.element.c_str(), ResolveMode::NoResolve)) { Gui::Selection().rmvSelection(docname, objname, info.element.c_str(), &sels); + return true; + } else { getFullSubElementName(subName); bool ok = Gui::Selection().addSelection(docname, objname, @@ -625,7 +627,8 @@ bool SoFCUnifiedSelection::setSelection(const std::vector &infos, bo type = hasNext ? SoSelectionElementAction::All : SoSelectionElementAction::Append; } } - } else { + } + else { // Hierarchy ascending // // If the clicked subelement is already selected, check if there is an @@ -698,6 +701,7 @@ bool SoFCUnifiedSelection::setSelection(const std::vector &infos, bo getMainWindow()->showMessage(QString::fromLatin1(buf)); } } + if (pPath) { FC_TRACE("applying action"); SoSelectionElementAction action(type);