FEM: C++ constraints, clear selection on unsetEdit, same system as it is on Python constraints

This commit is contained in:
Bernd Hahnebach
2018-05-21 14:31:54 +02:00
committed by wmayer
parent 995606a2fc
commit 1244ae42b3

View File

@@ -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