Skip to content

Commit

Permalink
ShortcutDialog: Fix search functionality (change checks from QLineEdi…
Browse files Browse the repository at this point in the history
…t to ShortcutDialogLineEdit)
  • Loading branch information
DavidoTek committed Jan 19, 2024
1 parent 2944d03 commit c834be5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pupgui2/pupgui2shortcutdialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,9 @@ def btn_remove_clicked(self):
def search_shortcuts(self, text):
""" Search based on the shortcut name text (App Name on Row 0) in the QLineEdit widget on each row """
for row in range(self.ui.tableShortcuts.rowCount()):
if type(row_widget_name := self.ui.tableShortcuts.cellWidget(row, 0)) is not QLineEdit:
if type(row_widget_name := self.ui.tableShortcuts.cellWidget(row, 0)) is not ShortcutDialogLineEdit:
continue
if type(row_widget_exe := self.ui.tableShortcuts.cellWidget(row, 1)) is not QLineEdit:
if type(row_widget_exe := self.ui.tableShortcuts.cellWidget(row, 1)) is not ShortcutDialogLineEdit:
row_widget_exe = None
search_text_in_name = text.lower() in row_widget_name.text().lower()
search_text_in_exe = text.lower() in row_widget_exe.text().lower() if row_widget_exe else False
Expand Down

0 comments on commit c834be5

Please sign in to comment.