From 39e67cc66bc96378929690036dd3b33955907ab4 Mon Sep 17 00:00:00 2001 From: danielhrisca Date: Fri, 8 Dec 2023 10:56:35 +0200 Subject: [PATCH] faster deletion of items in the batch view --- src/asammdf/gui/widgets/batch.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/asammdf/gui/widgets/batch.py b/src/asammdf/gui/widgets/batch.py index 12b5538ce..646eab71e 100644 --- a/src/asammdf/gui/widgets/batch.py +++ b/src/asammdf/gui/widgets/batch.py @@ -130,7 +130,7 @@ def __init__( self.setAcceptDrops(True) self.files_list.model().rowsInserted.connect(self.update_channel_tree) - self.files_list.model().rowsRemoved.connect(self.update_channel_tree) + self.files_list.itemsDeleted.connect(self.update_channel_tree) self.filter_tree.itemChanged.connect(self.filter_changed) self._selected_filter = set() @@ -1068,6 +1068,8 @@ def update_channel_tree(self, *args): if not count: self.filter_tree.clear() return + elif self.filter_tree.topLevelItemCount(): + return else: uuid = os.urandom(6).hex()