Skip to content

Commit 4f15d26

Browse files
committed
Renamed CAATypesSelectorDialog.clear_focus to _on_list_clicked
This makes the usage of the function clearer, as this is being used as a Qt slot.
1 parent 8933007 commit 4f15d26

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, *args):
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)