From 29853deefa0d664ec0db06f3abb2817fac5f12b7 Mon Sep 17 00:00:00 2001 From: nds Date: Wed, 18 Mar 2015 14:34:25 +0300 Subject: [PATCH] Sketch selection in the browser for extrusion operation An empty shape for the sketch result --- src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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(); -- 2.39.2