From: nds Date: Thu, 17 Sep 2015 10:00:59 +0000 (+0300) Subject: Extrusion Cut: the current extrusion cut feature should be restored after sketch... X-Git-Tag: V_1.4.0~37 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0a913f43ce9d67a7f88869e3d6502a09f0e16111;p=modules%2Fshaper.git Extrusion Cut: the current extrusion cut feature should be restored after sketch is finished. --- diff --git a/src/PartSet/PartSet_WidgetSketchCreator.cpp b/src/PartSet/PartSet_WidgetSketchCreator.cpp index 347620630..4a90a591f 100644 --- a/src/PartSet/PartSet_WidgetSketchCreator.cpp +++ b/src/PartSet/PartSet_WidgetSketchCreator.cpp @@ -127,8 +127,17 @@ void PartSet_WidgetSketchCreator::onStarted() // Launch Sketch operation CompositeFeaturePtr aCompFeature = std::dynamic_pointer_cast(myFeature); + + /// add sketch feature without current feature change. + /// it is important to do not change the current feature in order to + /// after sketch edition, the extrusion cut feature becomes current + SessionPtr aMgr = ModelAPI_Session::get(); + DocumentPtr aDoc = aMgr->activeDocument(); + FeaturePtr aPreviousCurrentFeature = aDoc->currentFeature(false); FeaturePtr aSketch = aCompFeature->addFeature("Sketch"); + aDoc->setCurrentFeature(aPreviousCurrentFeature, false); + // start edit operation for the sketch ModuleBase_OperationFeature* aFOperation = dynamic_cast (myModule->createOperation("Sketch")); if (aFOperation)