Salome HOME
refs #1508
authorisn <isn@opencascade.com>
Thu, 11 Jan 2018 14:39:13 +0000 (17:39 +0300)
committerisn <isn@opencascade.com>
Thu, 11 Jan 2018 14:39:13 +0000 (17:39 +0300)
src/HYDROGUI/HYDROGUI_ObjListBox.cxx

index 38ffb4c16dbb1261d47e29c54d513338a113b864..1d78a57fd7ac1400a2f1d1333ea379f27529a193 100644 (file)
@@ -123,7 +123,19 @@ void HYDROGUI_ObjListBox::OnExclude()
 {
   QList<QListWidgetItem*> aSelection = myList->selectedItems();
   foreach( QListWidgetItem* anItem, aSelection )
+  {
+    QString itemText = anItem->text();
+    for (int i=mySelection.Lower();i<=mySelection.Upper();i++)
+    {
+      QString name = mySelection(i)->GetName();
+      if (itemText == name)
+      {
+        mySelection.Remove(i);
+        break;
+      }
+    }
     delete anItem;
+  }
   emit selectionChanged();
 }