From 1244ae42b3b386359b7ba9b161aa74aab809cf3f Mon Sep 17 00:00:00 2001 From: Bernd Hahnebach Date: Mon, 21 May 2018 14:31:54 +0200 Subject: [PATCH] FEM: C++ constraints, clear selection on unsetEdit, same system as it is on Python constraints --- src/Mod/Fem/Gui/ViewProviderFemConstraint.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Mod/Fem/Gui/ViewProviderFemConstraint.cpp b/src/Mod/Fem/Gui/ViewProviderFemConstraint.cpp index 51db299055..069c950e8c 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemConstraint.cpp +++ b/src/Mod/Fem/Gui/ViewProviderFemConstraint.cpp @@ -191,6 +191,9 @@ bool ViewProviderFemConstraint::setEdit(int ModNum) void ViewProviderFemConstraint::unsetEdit(int ModNum) { + // clear the selection (convenience) + Gui::Selection().clearSelection(); + if ((wizardWidget != NULL) && (wizardSubLayout != NULL) && (constraintDialog != NULL)) { wizardWidget = NULL; wizardSubLayout = NULL; @@ -200,6 +203,7 @@ void ViewProviderFemConstraint::unsetEdit(int ModNum) // Notify the Shaft Wizard that we have finished editing // See WizardShaft.py on why we do it this way Gui::Command::runCommand(Gui::Command::Doc, "Gui.runCommand('PartDesign_WizardShaftCallBack')"); + } else { if (ModNum == ViewProvider::Default) { // when pressing ESC make sure to close the dialog