From b8376e152901a025acd822c59a5c8bdf845b888f Mon Sep 17 00:00:00 2001 From: Abdullah Tahiri Date: Sat, 7 Nov 2020 20:14:39 +0100 Subject: [PATCH] Sketcher: Fix select associated constraints when drawhandler active --- src/Mod/Sketcher/Gui/CommandSketcherTools.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Mod/Sketcher/Gui/CommandSketcherTools.cpp b/src/Mod/Sketcher/Gui/CommandSketcherTools.cpp index 53c53ec6e2..aee88cd533 100644 --- a/src/Mod/Sketcher/Gui/CommandSketcherTools.cpp +++ b/src/Mod/Sketcher/Gui/CommandSketcherTools.cpp @@ -306,14 +306,14 @@ void CmdSketcherSelectConstraints::activated(int iMsg) { Q_UNUSED(iMsg); - // Cancel any in-progress operation - Gui::Document* doc = Gui::Application::Instance->activeDocument(); - SketcherGui::ReleaseHandler(doc); - // get the selection std::vector selection; selection = getSelection().getSelectionEx(0, Sketcher::SketchObject::getClassTypeId()); + // Cancel any in-progress operation + Gui::Document* doc = Gui::Application::Instance->activeDocument(); + SketcherGui::ReleaseHandler(doc); + // only one sketch with its subelements are allowed to be selected if (selection.size() != 1) { QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"),