Skip to content

Commit b02c0a8

Browse files
authored
Merge pull request #2474 from phw/fix-QListWidget-click-slot
Fixed callback for click signal in CAATypesSelectorDialog
2 parents 5350b2c + 4f15d26 commit b02c0a8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

picard/ui/caa_types_selector.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,9 @@ def __init__(
190190
self.fill_lists(types_include, types_exclude)
191191

192192
# Set triggers when the lists receive the current focus
193-
self.list_include.clicked.connect(partial(self.clear_focus, [self.list_ignore, self.list_exclude]))
194-
self.list_exclude.clicked.connect(partial(self.clear_focus, [self.list_ignore, self.list_include]))
195-
self.list_ignore.clicked.connect(partial(self.clear_focus, [self.list_include, self.list_exclude]))
193+
self.list_include.clicked.connect(partial(self._on_list_clicked, (self.list_ignore, self.list_exclude)))
194+
self.list_exclude.clicked.connect(partial(self._on_list_clicked, (self.list_ignore, self.list_include)))
195+
self.list_ignore.clicked.connect(partial(self._on_list_clicked, (self.list_include, self.list_exclude)))
196196

197197
# Add instructions to the dialog box
198198
instructions = QtWidgets.QLabel()
@@ -325,7 +325,7 @@ def included(self):
325325
def excluded(self):
326326
return list(self.list_exclude.all_items_data()) or ['none']
327327

328-
def clear_focus(self, lists):
328+
def _on_list_clicked(self, lists, index):
329329
for temp_list in lists:
330330
temp_list.clearSelection()
331331
self.set_buttons_enabled_state()

0 commit comments

Comments
 (0)