From: vsv Date: Tue, 9 Jun 2015 16:13:41 +0000 (+0300) Subject: Launch Sketch with ExtrusionCut X-Git-Tag: V_1.3.0~256 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=cac4fb987472e7764f932c041f34a39fed005cc9;p=modules%2Fshaper.git Launch Sketch with ExtrusionCut --- diff --git a/src/PartSet/PartSet_SketcherMgr.cpp b/src/PartSet/PartSet_SketcherMgr.cpp index a086aa868..df93f32a2 100644 --- a/src/PartSet/PartSet_SketcherMgr.cpp +++ b/src/PartSet/PartSet_SketcherMgr.cpp @@ -716,16 +716,19 @@ void PartSet_SketcherMgr::startSketch(ModuleBase_Operation* theOperation) myPlaneFilter = new ModuleBase_ShapeInPlaneFilter(); myModule->workshop()->viewer()->addSelectionFilter(myPlaneFilter); + bool aHasPlane = false; if (theOperation->isEditOperation()) { // If it is editing of sketch then it means that plane is already defined std::shared_ptr aPln = PartSet_Tools::sketchPlane(myCurrentSketch); - if (aPln.get()) + if (aPln.get()) { myPlaneFilter->setPlane(aPln->impl()); + aHasPlane = true; + } } Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_TO_REDISPLAY)); // all sketch objects should be activated in the sketch selection modes by edit operation start // in case of creation operation, there is an active widget, which activates own selection mode - if (theOperation->isEditOperation()) + if (theOperation->isEditOperation() && aHasPlane) aConnector->activateModuleSelectionModes(); } diff --git a/src/PartSet/PartSet_WidgetSketchLabel.cpp b/src/PartSet/PartSet_WidgetSketchLabel.cpp index 82b234fff..0d1b2bd2c 100644 --- a/src/PartSet/PartSet_WidgetSketchLabel.cpp +++ b/src/PartSet/PartSet_WidgetSketchLabel.cpp @@ -354,7 +354,7 @@ std::shared_ptr PartSet_WidgetSketchLabel::setSketchPlane(const Top { if (theShape.IsNull()) return std::shared_ptr(); - int aType = theShape.ShapeType(); + // get selected shape std::shared_ptr aGShape(new GeomAPI_Shape); aGShape->setImpl(new TopoDS_Shape(theShape));