Fix T42137: Keymap editing is broken

Own mistake in previous fix here, was too greedy in finding an existing kmi of UserPref add diff kmi, we only want
to ignore exact same kmi's here.
This commit is contained in:
Bastien Montagne 2014-10-07 23:39:56 +02:00
parent 8f1cdc1949
commit e36cc29a69
Notes: blender-bot 2023-02-14 09:58:57 +01:00
Referenced by issue #42137, Keymap editing is broken
1 changed files with 1 additions and 2 deletions

View File

@ -590,9 +590,8 @@ static void wm_keymap_patch(wmKeyMap *km, wmKeyMap *diff_km)
/* add item */
if (kmdi->add_item) {
/* Do not re-add an already existing keymap item! See T42088. */
/* We seek only for exact copy here! See T42137. */
kmi_add = wm_keymap_find_item_equals(km, kmdi->add_item);
if (!kmi_add)
kmi_add = wm_keymap_find_item_equals_result(km, kmdi->add_item);
/* only if nothing to remove or item to remove found */
if (!kmi_add && (!kmdi->remove_item || kmi_remove)) {
kmi_add = wm_keymap_item_copy(kmdi->add_item);