From: nds Date: Wed, 18 Mar 2015 11:34:25 +0000 (+0300) Subject: Sketch selection in the browser for extrusion operation X-Git-Tag: V_1.1.0~109^2~8 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=29853deefa0d664ec0db06f3abb2817fac5f12b7;p=modules%2Fshaper.git Sketch selection in the browser for extrusion operation An empty shape for the sketch result --- diff --git a/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp b/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp index edf9f03ad..2b1dd47ad 100644 --- a/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp +++ b/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp @@ -214,7 +214,7 @@ void ModuleBase_WidgetMultiSelector::onSelectionChanged() for (aIt = aOwnersList.cbegin(); aIt != aOwnersList.cend(); aShpIt.Next(), aIt++) { ResultPtr aResult = std::dynamic_pointer_cast(*aIt); // this case should be moved to PartSet module after redesign this class - if (aShpIt.Value().ShapeType() == TopAbs_COMPOUND) { + /*if (aShpIt.Value().ShapeType() == TopAbs_COMPOUND) { int aValue = 0; AIS_ListOfInteractive aList; aSelection->selectedAISObjects(aList); @@ -237,7 +237,8 @@ void ModuleBase_WidgetMultiSelector::onSelectionChanged() } } } - else { + else*/ + { if (myFeature) { // We can not select a result of our feature const std::list& aResList = myFeature->results(); @@ -255,7 +256,12 @@ void ModuleBase_WidgetMultiSelector::onSelectionChanged() aShape = std::shared_ptr(new GeomAPI_Shape()); aShape->setImpl(new TopoDS_Shape(aShpIt.Value())); - mySelection.append(GeomSelection(aResult, aShape)); + if (aShape->isEqual(aResult->shape())) { + aShape = std::shared_ptr(new GeomAPI_Shape()); + mySelection.append(GeomSelection(aResult, aShape)); + } + else + mySelection.append(GeomSelection(aResult, aShape)); } } //updateSelectionList();