From 541d3c57103bcbd4da7147876380f6d8d014c181 Mon Sep 17 00:00:00 2001 From: Sergey BELASH Date: Mon, 10 Nov 2014 20:09:56 +0300 Subject: [PATCH] Issue #219 force repaint for group list added. Posibility to add the group's results eliminated. --- .../ModuleBase_WidgetMultiSelector.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) 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(); +} -- 2.39.2