eric6/Preferences/ShortcutsDialog.py

branch
maintenance
changeset 8731
c6264a513aa4
parent 8273
698ae46f40a4
parent 8715
197cbf6256de
--- a/eric6/Preferences/ShortcutsDialog.py	Sat Sep 04 11:35:19 2021 +0200
+++ b/eric6/Preferences/ShortcutsDialog.py	Sat Oct 30 10:41:14 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