From: sbh Date: Tue, 23 Sep 2014 07:41:44 +0000 (+0400) Subject: Bugfix: duplicated commit on "Return" and crash on "Return" with no active operations X-Git-Tag: V_0.4.4~34 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0bf596dd0b3bb3cde5e14ed00efdf0565d460591;p=modules%2Fshaper.git Bugfix: duplicated commit on "Return" and crash on "Return" with no active operations --- diff --git a/src/PartSet/PartSet_OperationFeatureCreate.cpp b/src/PartSet/PartSet_OperationFeatureCreate.cpp index 4e5165fa5..845efd6a1 100644 --- a/src/PartSet/PartSet_OperationFeatureCreate.cpp +++ b/src/PartSet/PartSet_OperationFeatureCreate.cpp @@ -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: diff --git a/src/XGUI/XGUI_OperationMgr.cpp b/src/XGUI/XGUI_OperationMgr.cpp index 58260b79c..00cd7df25 100644 --- a/src/XGUI/XGUI_OperationMgr.cpp +++ b/src/XGUI/XGUI_OperationMgr.cpp @@ -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