]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix for the issue #1968
authormpv <mpv@opencascade.com>
Mon, 9 Jan 2017 15:56:22 +0000 (18:56 +0300)
committermpv <mpv@opencascade.com>
Mon, 9 Jan 2017 15:56:22 +0000 (18:56 +0300)
src/Model/Model_AttributeSelection.cpp

index 8391d72f551a6f083722c39e003b7b065145bcb6..8fc2d5e77296ff285f37c758a5a1bafae4262cea 100644 (file)
@@ -929,10 +929,8 @@ void Model_AttributeSelection::selectConstruction(
     }
   }
   // store the selected as primitive
-  TNaming_Builder aBuilder(selectionLabel());
-  aBuilder.Generated(aSubShape);
-    registerSubShape(
-      selectionLabel(), aSubShape, 0, aContextFeature, aMyDoc, anOrientations, aSubNames, aRefs);
+  registerSubShape(
+    selectionLabel(), aSubShape, 0, aContextFeature, aMyDoc, anOrientations, aSubNames, aRefs);
 }
 
 bool Model_AttributeSelection::selectPart(
@@ -1156,6 +1154,8 @@ void Model_AttributeSelection::updateInHistory()
   // that this one and is really modifies the referenced result to refer to it
   ResultPtr aModifierResFound;
   TNaming_Iterator aPairIter(aContNS);
+  if (!aPairIter.More())
+    return;
   TopoDS_Shape aNewShape = aPairIter.NewShape();
   bool anIterate = true;
   // trying to update also the sub-shape selected