eric7/Preferences/ShortcutsDialog.py

branch
eric7
changeset 8708
b904e88e04a0
parent 8366
2a9f5153c438
child 8881
54e42bc2437a
diff -r 16b25e115ac0 -r b904e88e04a0 eric7/Preferences/ShortcutsDialog.py
--- a/eric7/Preferences/ShortcutsDialog.py	Wed Oct 20 19:48:21 2021 +0200
+++ b/eric7/Preferences/ShortcutsDialog.py	Wed Oct 20 20:06:23 2021 +0200
@@ -475,11 +475,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