]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/SketchPlugin/SketchPlugin_Offset.cpp
Salome HOME
Issue #20274: No intersection point from python dump
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_Offset.cpp
index f3f8d2b891e543bdc309c36822ff4c5cad3774d5..4400e8e612ec3dab39301459019861d2b9712cdc 100644 (file)
@@ -127,6 +127,11 @@ void SketchPlugin_Offset::execute()
   if (isUpdateFlushed)
     Events_Loop::loop()->setFlushed(anUpdateEvent, false);
 
+  // Save the current feature of the document, because new features may appear while executing.
+  // In this case, they will become current. But if the number of copies is updated from outside
+  // of sketch (e.g. by parameter change), the history line should not hold in sketch.
+  keepCurrentFeature();
+
   // 5. Gather wires and make offset for each wire
   ListOfMakeShape anOffsetAlgos;
   std::set<FeaturePtr> aProcessedEdgesSet;
@@ -199,6 +204,8 @@ void SketchPlugin_Offset::execute()
   //    created features in CREATED_ID() to remove them on next execute()
   addToSketch(anOffsetAlgos);
 
+  restoreCurrentFeature();
+
   // send events to update the sub-features by the solver
   if (isUpdateFlushed)
     Events_Loop::loop()->setFlushed(anUpdateEvent, true);