Salome HOME
Fix for the issue #1555: Problem in edition of the sketch in ExtrusionCut
authormpv <mpv@opencascade.com>
Wed, 15 Jun 2016 06:50:17 +0000 (09:50 +0300)
committermpv <mpv@opencascade.com>
Wed, 15 Jun 2016 06:50:17 +0000 (09:50 +0300)
src/Model/Model_Document.cpp

index 0c40c27230db30754d8036b080f676fbbbf0cb2a..8ce08d8ee8442563d1a27a8b27a8ac60f483dcf1 100755 (executable)
@@ -1047,8 +1047,9 @@ void Model_Document::setCurrentFeatureUp()
     FeaturePtr aPrev = myObjs->nextFeature(aCurrent, true);
     // make the higher level composite as current (sketch becomes disabled if line is enabled)
     if (aPrev.get()) {
-      for(FeaturePtr aComp = ModelAPI_Tools::compositeOwner(aPrev); aComp.get();
-        aComp = ModelAPI_Tools::compositeOwner(aPrev))
+      FeaturePtr aComp = ModelAPI_Tools::compositeOwner(aPrev);
+      // without cycle (issue 1555): otherwise extrusion fuse will be enabled and displayed whaen inside sketch
+      if (aComp.get()) 
           aPrev = aComp;
     }
     // do not flush: it is called only on remove, it will be flushed in the end of transaction