Sketcher: Fix select associated constraints when drawhandler active

This commit is contained in:
Abdullah Tahiri
2020-11-07 20:14:39 +01:00
parent 4daf73c61a
commit 0a83c8d6f3

View File

@@ -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<Gui::SelectionObject> 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"),