From: vsv Date: Tue, 6 Sep 2016 15:05:51 +0000 (+0300) Subject: Issue #1730: do not hide sketch objects if sketch editing is active X-Git-Tag: V_2.5.0~37 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=1cc05a4cf97f584cbcc1e919c7f85bae656e6b8b;p=modules%2Fshaper.git Issue #1730: do not hide sketch objects if sketch editing is active --- diff --git a/src/PartSet/PartSet_SketcherMgr.cpp b/src/PartSet/PartSet_SketcherMgr.cpp index bb9c18df2..dd8004bf1 100755 --- a/src/PartSet/PartSet_SketcherMgr.cpp +++ b/src/PartSet/PartSet_SketcherMgr.cpp @@ -1089,19 +1089,7 @@ bool PartSet_SketcherMgr::canEraseObject(const ObjectPtr& theObject) const bool aCanErase = true; // when the sketch operation is active, results of sketch sub-feature can not be hidden if (myCurrentSketch.get()) { - ResultPtr aResult = std::dynamic_pointer_cast(theObject); - if (aResult.get()) { - // Display sketcher objects - for (int i = 0; i < myCurrentSketch->numberOfSubs() && aCanErase; i++) { - - FeaturePtr aFeature = myCurrentSketch->subFeature(i); - std::list aResults = aFeature->results(); - std::list::const_iterator anIt; - for (anIt = aResults.begin(); anIt != aResults.end() && aCanErase; ++anIt) { - aCanErase = *anIt != aResult; - } - } - } + return !isObjectOfSketch(theObject); } return aCanErase; }