From: mpv Date: Tue, 11 Nov 2014 12:51:36 +0000 (+0300) Subject: Issue #249 : hide sketcher on Apply of extrusion based on it X-Git-Tag: V_0.5~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=87fdf957d34be6d26791d8d8096f25d7e6d0990b;p=modules%2Fshaper.git Issue #249 : hide sketcher on Apply of extrusion based on it --- diff --git a/src/Model/Model_Update.cpp b/src/Model/Model_Update.cpp index cb511c8e3..910527bb2 100644 --- a/src/Model/Model_Update.cpp +++ b/src/Model/Model_Update.cpp @@ -91,6 +91,23 @@ void Model_Update::processEvent(const boost::shared_ptr& theMess isAutomaticChanged = true; isAutomatic = true; } + // the hardcode (DBC asked): hide the sketch referenced by extrusion on apply + if (theMessage->eventID() == kOpFinishEvent) { + std::set >::iterator aFIter; + for(aFIter = myJustCreatedOrUpdated.begin(); aFIter != myJustCreatedOrUpdated.end(); aFIter++) + { + FeaturePtr aF = boost::dynamic_pointer_cast(*aFIter); + if (aF && aF->getKind() == "Extrusion") { + if (aF->selection("extrusion_face")) { + ResultPtr aSketchRes = aF->selection("extrusion_face")->context(); + if (aSketchRes) { + static Events_ID HIDE_DISP = Events_Loop::loop()->eventByName(EVENT_OBJECT_TOHIDE); + ModelAPI_EventCreator::get()->sendUpdated(aSketchRes, HIDE_DISP); + } + } + } + } + } } if (isExecuted)