eric6/Preferences/ShortcutsDialog.py

changeset 8715
197cbf6256de
parent 8218
7c09585bd960
child 8731
c6264a513aa4
--- a/eric6/Preferences/ShortcutsDialog.py	Thu Oct 21 17:58:08 2021 +0200
+++ b/eric6/Preferences/ShortcutsDialog.py	Sun Oct 24 10:59:46 2021 +0200
@@ -471,11 +471,13 @@
             for index in range(topItem.childCount()):
                 itm = topItem.child(index)
                 if (
-                    (self.actionButton.isChecked() and
-                     rx.search(itm.text(0)) is not None) or
-                    (self.shortcutButton.isChecked() and
-                     txt.lower() not in itm.text(1).lower() and
-                     txt.lower() not in itm.text(2).lower())
+                    txt and (
+                        (self.actionButton.isChecked() and
+                         rx.search(itm.text(0)) is None) or
+                        (self.shortcutButton.isChecked() and
+                         txt.lower() not in itm.text(1).lower() and
+                         txt.lower() not in itm.text(2).lower())
+                    )
                 ):
                     itm.setHidden(True)
                     childHiddenCount += 1

eric ide

mercurial