diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-29 13:46:54 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-29 13:48:12 +0300 |
commit | 2223d63c58c9a2125fb4a2e6ee1c780c781a95bb (patch) | |
tree | 42b820b7ffd2ebe4f71a51d6e05b73c1cc13fdd7 /source/blender/windowmanager/intern/wm_keymap.c | |
parent | 3733be8731df978ec50cd283ff24b813bdd89df1 (diff) |
Refactor static override code to pass Main around.
Access to main database is actually rarely needed, but some custom
'apply' functions do need it (like Collections' overriding of objects or
children collections).
Diffstat (limited to 'source/blender/windowmanager/intern/wm_keymap.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_keymap.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/windowmanager/intern/wm_keymap.c b/source/blender/windowmanager/intern/wm_keymap.c index bcb4fffea87..2b0c550280d 100644 --- a/source/blender/windowmanager/intern/wm_keymap.c +++ b/source/blender/windowmanager/intern/wm_keymap.c @@ -166,7 +166,8 @@ static void wm_keyconfig_properties_update_ot(ListBase *km_lb) static bool wm_keymap_item_equals_result(wmKeyMapItem *a, wmKeyMapItem *b) { return (STREQ(a->idname, b->idname) && - RNA_struct_equals(a->ptr, b->ptr, RNA_EQ_UNSET_MATCH_NONE) && + /* We do not really care about which Main we pass here, tbh. */ + RNA_struct_equals(G_MAIN, a->ptr, b->ptr, RNA_EQ_UNSET_MATCH_NONE) && (a->flag & KMI_INACTIVE) == (b->flag & KMI_INACTIVE) && a->propvalue == b->propvalue); } |