Salome HOME
Bugfix: duplicated commit on "Return" and crash on "Return" with no active operations
authorsbh <sergey.belash@opencascade.com>
Tue, 23 Sep 2014 07:41:44 +0000 (11:41 +0400)
committersbh <sergey.belash@opencascade.com>
Tue, 23 Sep 2014 07:41:44 +0000 (11:41 +0400)
src/PartSet/PartSet_OperationFeatureCreate.cpp
src/XGUI/XGUI_OperationMgr.cpp

index 4e5165fa5d16d9ab0e8dea361713d01afa10bfe6..845efd6a13858577047b02137cdf22aba6946edb 100644 (file)
@@ -94,10 +94,8 @@ void PartSet_OperationFeatureCreate::keyReleased(const int theKey)
   switch (theKey) {
     case Qt::Key_Return:
     case Qt::Key_Enter: {
-      if (commit()) {
         // it start a new line creation at a free point
         restartOperation(feature()->getKind());
-      }
     }
       break;
     default:
index 58260b79c6cd24bce86d4a53a138de985531c0a4..00cd7df254bdeed0603d4a63d9cdc41a7e6da39d 100644 (file)
@@ -112,6 +112,8 @@ bool XGUI_OperationMgr::abortAllOperations()
 
 bool XGUI_OperationMgr::validateOperation(ModuleBase_Operation* theOperation)
 {
+  if(!theOperation)
+    return false;
   //Get operation feature to validate
   FeaturePtr aFeature = theOperation->feature();
   if (!aFeature) return true; // rename operation