From: mpv Date: Wed, 27 May 2015 11:30:35 +0000 (+0300) Subject: Abort sketcher when it is not the last feature: fix for modifications outside of... X-Git-Tag: V_1.2.0~56 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=50423ba6441f316eb5d6370ad758dac89a5d1244;p=modules%2Fshaper.git Abort sketcher when it is not the last feature: fix for modifications outside of transaction (set current feature) --- diff --git a/src/ModuleBase/ModuleBase_Operation.cpp b/src/ModuleBase/ModuleBase_Operation.cpp index fc4e35945..fea325f68 100644 --- a/src/ModuleBase/ModuleBase_Operation.cpp +++ b/src/ModuleBase/ModuleBase_Operation.cpp @@ -183,7 +183,12 @@ void ModuleBase_Operation::abort() if (myIsEditing) { SessionPtr aMgr = ModelAPI_Session::get(); DocumentPtr aDoc = aMgr->activeDocument(); + bool aIsOp = aMgr->isOperation(); + if (!aIsOp) + aMgr->startOperation(); aDoc->setCurrentFeature(myCurrentFeature, true); + if (!aIsOp) + aMgr->finishOperation(); myCurrentFeature = FeaturePtr(); } abortOperation();