make duplicate registerItem() a no-op
This commit is contained in:
@@ -221,7 +221,6 @@
|
||||
(controls.clear)
|
||||
(inputTexts.clear)
|
||||
(keyHandler.clear)
|
||||
(xHandler.clear)
|
||||
(makeXControls)
|
||||
(set nextControlX 0)
|
||||
(set nextControlY 0)
|
||||
|
@@ -80,6 +80,10 @@
|
||||
conflictMessage "Keyboard shortcut for $description conflicts with $existingKey"]
|
||||
(if keys
|
||||
(case existingKey
|
||||
// No harm in registering the same item twice:
|
||||
((when (= otherItem item) (or (Final otherItem) (Cancel otherItem)))
|
||||
(return))
|
||||
// Conflicting with a different one, on the other hand:
|
||||
((or (Final _) (Cancel _))
|
||||
(tryCallOrThrow onBadShortcut conflictMessage false description existingKey))
|
||||
((Prefix innerPrefixMap)
|
||||
|
Reference in New Issue
Block a user