]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #219 force repaint for group list added. Posibility to add the group's results...
authorSergey BELASH <belash.sergey@opencascade.com>
Mon, 10 Nov 2014 17:09:56 +0000 (20:09 +0300)
committerSergey BELASH <belash.sergey@opencascade.com>
Mon, 10 Nov 2014 17:09:56 +0000 (20:09 +0300)
src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp

index d3acd5c4e1325b488c962855bebd2a60e913a256..87c62ba3909e0eae55b51f2e95a294a36b0e733b 100644 (file)
@@ -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<ModelAPI_Result>(*aIt);
+    if (myFeature) {
+      // We can not select a result of our feature
+      const std::list<ResultPtr>& aResList = myFeature->results();
+      std::list<ResultPtr>::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<GeomAPI_Shape>(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();
+}