From: mpv Date: Fri, 16 May 2014 07:30:21 +0000 (+0400) Subject: Correct update of tree on abort operation X-Git-Tag: V_0.2~54^2~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=32c03ac03cf424e7055a7237c2c0901d70dca1e8;p=modules%2Fshaper.git Correct update of tree on abort operation --- diff --git a/src/Model/Model_Document.cpp b/src/Model/Model_Document.cpp index 73e6adbc7..7618babe2 100644 --- a/src/Model/Model_Document.cpp +++ b/src/Model/Model_Document.cpp @@ -196,6 +196,7 @@ void Model_Document::finishOperation() void Model_Document::abortOperation() { myDoc->AbortCommand(); + synchronizeFeatures(); // abort for all subs set::iterator aSubIter = mySubs.begin(); for(; aSubIter != mySubs.end(); aSubIter++) diff --git a/src/SketchPlugin/SketchPlugin_Feature.cpp b/src/SketchPlugin/SketchPlugin_Feature.cpp index 00c849fc9..e75bc01e6 100644 --- a/src/SketchPlugin/SketchPlugin_Feature.cpp +++ b/src/SketchPlugin/SketchPlugin_Feature.cpp @@ -18,13 +18,15 @@ void SketchPlugin_Feature::setData(boost::shared_ptr theData) for(int a = 0; a < aSketches && !mySketch; a++) { boost::shared_ptr aSketch = boost::dynamic_pointer_cast(document()->feature("Construction", a)); - std::list > aList = - aSketch->data()->reflist(SKETCH_ATTR_FEATURES)->list(); - std::list >::iterator aSub = aList.begin(); - for(; aSub != aList.end(); aSub++) { - if ((*aSub)->data()->isEqual(theData)) { - mySketch = aSketch.get(); - break; + if (aSketch) { + std::list > aList = + aSketch->data()->reflist(SKETCH_ATTR_FEATURES)->list(); + std::list >::iterator aSub = aList.begin(); + for(; aSub != aList.end(); aSub++) { + if ((*aSub)->data()->isEqual(theData)) { + mySketch = aSketch.get(); + break; + } } } }