From 06ad4a10ab4ba92335fa9751bdce9f479ce73605 Mon Sep 17 00:00:00 2001 From: isn Date: Thu, 11 Jan 2018 17:39:13 +0300 Subject: [PATCH] refs #1508 --- src/HYDROGUI/HYDROGUI_ObjListBox.cxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/HYDROGUI/HYDROGUI_ObjListBox.cxx b/src/HYDROGUI/HYDROGUI_ObjListBox.cxx index 38ffb4c1..1d78a57f 100644 --- a/src/HYDROGUI/HYDROGUI_ObjListBox.cxx +++ b/src/HYDROGUI/HYDROGUI_ObjListBox.cxx @@ -123,7 +123,19 @@ void HYDROGUI_ObjListBox::OnExclude() { QList 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(); } -- 2.39.2