Salome HOME
Issue #3236: Provide icons for extrusions
[modules/shaper.git] / src / ModuleBase / ModuleBase_ListView.cpp
index d9fe13d2c18339a17daaafebe041484adacb8e43..5fd8909eefb4374cf7f6a24549fe17f26668cc24 100644 (file)
@@ -77,6 +77,19 @@ void ModuleBase_ListView::getSelectedIndices(std::set<int>& theIndices)
   }
 }
 
+//********************************************************************
+void  ModuleBase_ListView::selectIndices(const std::set<int>& theIndices)
+{
+  myListControl->clearSelection();
+  for (int i = 0; i < myListControl->count(); i++) {
+    QListWidgetItem* anItem = myListControl->item(i);
+    int aId = anItem->data(ATTRIBUTE_SELECTION_INDEX_ROLE).toInt();
+    if (theIndices.find(aId) != theIndices.end()) {
+      anItem->setSelected(true);
+    }
+  }
+}
+
 //********************************************************************
 void ModuleBase_ListView::removeSelectedItems()
 {