Handle new sections in KeyConfgParser._is_new().
This commit is contained in:
parent
9ee74253e4
commit
3164ee06eb
@ -256,7 +256,10 @@ class KeyConfigParser(QObject):
|
|||||||
A binding is considered new if both the command is not bound to any key
|
A binding is considered new if both the command is not bound to any key
|
||||||
yet, and the key isn't used anywhere else in the same section.
|
yet, and the key isn't used anywhere else in the same section.
|
||||||
"""
|
"""
|
||||||
|
try:
|
||||||
bindings = self.keybindings[sectname]
|
bindings = self.keybindings[sectname]
|
||||||
|
except KeyError:
|
||||||
|
return True
|
||||||
if keychain in bindings:
|
if keychain in bindings:
|
||||||
return False
|
return False
|
||||||
elif command in bindings.values():
|
elif command in bindings.values():
|
||||||
|
Loading…
Reference in New Issue
Block a user