Bug fix for the keyboard shortcuts configuration dialog. eric7

Wed, 20 Oct 2021 20:06:23 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 20 Oct 2021 20:06:23 +0200
branch
eric7
changeset 8708
b904e88e04a0
parent 8706
16b25e115ac0
child 8709
41a9ecc5b17b

Bug fix for the keyboard shortcuts configuration dialog.

eric7/Preferences/ShortcutsDialog.py file | annotate | diff | comparison | revisions
--- 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