From 0bf596dd0b3bb3cde5e14ed00efdf0565d460591 Mon Sep 17 00:00:00 2001 From: sbh Date: Tue, 23 Sep 2014 11:41:44 +0400 Subject: [PATCH] Bugfix: duplicated commit on "Return" and crash on "Return" with no active operations --- src/PartSet/PartSet_OperationFeatureCreate.cpp | 2 -- src/XGUI/XGUI_OperationMgr.cpp | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) 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 -- 2.39.2