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