]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #1730: do not hide sketch objects if sketch editing is active
authorvsv <vitaly.smetannikov@opencascade.com>
Tue, 6 Sep 2016 15:05:51 +0000 (18:05 +0300)
committervsv <vitaly.smetannikov@opencascade.com>
Tue, 6 Sep 2016 15:06:05 +0000 (18:06 +0300)
src/PartSet/PartSet_SketcherMgr.cpp

index bb9c18df2daaa13636f8a30a5967e1f6d98c5988..dd8004bf1ac0e31b9150e79319acb2412278c1d5 100755 (executable)
@@ -1089,19 +1089,7 @@ bool PartSet_SketcherMgr::canEraseObject(const ObjectPtr& theObject) const
   bool aCanErase = true;\r
   // when the sketch operation is active, results of sketch sub-feature can not be hidden\r
   if (myCurrentSketch.get()) {\r
-    ResultPtr aResult = std::dynamic_pointer_cast<ModelAPI_Result>(theObject);\r
-    if (aResult.get()) {\r
-      // Display sketcher objects\r
-      for (int i = 0; i < myCurrentSketch->numberOfSubs() && aCanErase; i++) {\r
-\r
-        FeaturePtr aFeature = myCurrentSketch->subFeature(i);\r
-        std::list<ResultPtr> aResults = aFeature->results();\r
-        std::list<ResultPtr>::const_iterator anIt;\r
-        for (anIt = aResults.begin(); anIt != aResults.end() && aCanErase; ++anIt) {\r
-          aCanErase = *anIt != aResult;\r
-        }\r
-      }\r
-    }\r
+    return !isObjectOfSketch(theObject);\r
   }\r
   return aCanErase;\r
 }\r