From: vsv Date: Mon, 15 Jun 2015 16:29:08 +0000 (+0300) Subject: Using shape selected for sketcher X-Git-Tag: V_1.3.0~234 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=475b04ed2e28f1e6983cf54eaefece14e68f4aac;p=modules%2Fshaper.git Using shape selected for sketcher --- diff --git a/src/FeaturesPlugin/extrusioncut_widget.xml b/src/FeaturesPlugin/extrusioncut_widget.xml index a480b3cba..bb0d6b5f8 100755 --- a/src/FeaturesPlugin/extrusioncut_widget.xml +++ b/src/FeaturesPlugin/extrusioncut_widget.xml @@ -17,7 +17,7 @@ diff --git a/src/PartSet/PartSet_WidgetSketchCreator.cpp b/src/PartSet/PartSet_WidgetSketchCreator.cpp index fb687a891..1c4fbeddf 100644 --- a/src/PartSet/PartSet_WidgetSketchCreator.cpp +++ b/src/PartSet/PartSet_WidgetSketchCreator.cpp @@ -17,6 +17,11 @@ #include #include +#include +#include + +#include +#include #include #include @@ -158,5 +163,20 @@ void PartSet_WidgetSketchCreator::onResumed(ModuleBase_Operation* theOp) if (aIsOp) aMgr->abortOperation(); theOp->abort(); + } else { + DataPtr aData = aSketchFeature->data(); + AttributeSelectionPtr aSelAttr = + std::dynamic_pointer_cast + (aData->attribute(SketchPlugin_SketchEntity::EXTERNAL_ID())); + if (aSelAttr.get()) { + ResultPtr aRes = aSelAttr->context(); + GeomShapePtr aShape = aSelAttr->value(); + if (aRes.get()) { + AttributeSelectionListPtr aSelList = + aCompFeature->data()->selectionList(FeaturesPlugin_CompositeBoolean::BOOLEAN_OBJECTS_ID()); + aSelList->append(aRes, GeomShapePtr()); + updateObject(aCompFeature); + } + } } }