From: Sergey BELASH Date: Mon, 10 Nov 2014 17:09:56 +0000 (+0300) Subject: Issue #219 force repaint for group list added. Posibility to add the group's results... X-Git-Tag: V_0.5~6^2~3^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=541d3c57103bcbd4da7147876380f6d8d014c181;p=modules%2Fshaper.git Issue #219 force repaint for group list added. Posibility to add the group's results eliminated. --- diff --git a/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp b/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp index d3acd5c4e..87c62ba39 100644 --- a/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp +++ b/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp @@ -183,6 +183,20 @@ void ModuleBase_WidgetMultiSelector::onSelectionChanged() GeomShapePtr aShape; for (aIt = aOwnersList.cbegin(); aIt != aOwnersList.cend(); aShpIt.Next(), aIt++) { ResultPtr aResult = boost::dynamic_pointer_cast(*aIt); + if (myFeature) { + // We can not select a result of our feature + const std::list& aResList = myFeature->results(); + std::list::const_iterator aIt; + bool isSkipSelf = false; + for (aIt = aResList.cbegin(); aIt != aResList.cend(); ++aIt) { + if ((*aIt) == aResult) { + isSkipSelf = true; + break; + } + } + if(isSkipSelf) + continue; + } aShape = boost::shared_ptr(new GeomAPI_Shape()); aShape->setImpl(new TopoDS_Shape(aShpIt.Value())); mySelection.append(GeomSelection(aResult, aShape)); @@ -256,4 +270,5 @@ void ModuleBase_WidgetMultiSelector::updateSelectionList() myListControl->addItem(aName); i++; } -} \ No newline at end of file + myListControl->repaint(); +}