Salome HOME
Issue #2250 Fatal error or sigsegv when I use the "Echap" key: Escape processed by...
[modules/shaper.git] / src / XGUI / XGUI_OperationMgr.cpp
index 6d77ef8a3a3b0e78904dc0744538d25e7b66471d..224e1c40e50945fbce1929b54ed377c0efd2cacd 100644 (file)
@@ -714,7 +714,15 @@ bool XGUI_OperationMgr::onKeyPressed(QObject *theObject, QKeyEvent* theEvent)
         ModuleBase_IPropertyPanel* aPanel = aOperation->propertyPanel();
         ModuleBase_ModelWidget* anActiveWgt = aPanel->activeWidget();
         if (anActiveWgt)
+        {
           isAccepted = anActiveWgt && anActiveWgt->processAction(ActionEscape);
+          if (isAccepted) {
+            ModuleBase_OperationFeature* aFOperation =
+              dynamic_cast<ModuleBase_OperationFeature*>(currentOperation());
+            if (aFOperation)
+              aFOperation->setNeedToBeAborted(true);
+          }
+        }
       }
       if (!isAccepted)
       {