Blender Git Loki
Git Commits -> Revision 945ea40
Revision 945ea40 by Bastien Montagne (master) January 29, 2015, 16:32 (GMT) |
Fix T41757: Inconsistent hotkey label with setting. Issue is double here: * Quite a handfull of menu entries actually diverge slightly from their shortcut counterpart (often one has a prop explicitely set to its default value, when the other keep it unset). * Current code was actually basically sending 'is_strict' option into canal, by doing a second check in `wm_keymap_item_find` setting unset op props to their default value! Now, is_strict mostly says one thing: "never consider an unset property as equal to a set one". Even if set property matches default value. Default values are not always the same things as unset ones, as demonstrated by this report. So we are being much stricter now, and also have to check shortcuts and menu entries definitions actually matches, added some code (triggered by --debug-wm option) that prints when it finds some (potential) issue. There is one exception though - Macros. Those have their whole prop set defined in menu entries currently, this shall probably not be the case, but is another issue, so for now for macro operators we always do non-strict comparison (pretty much the same as previously, in this case). Also 'enum' operators are still tricky. Currently, shortcut extraction relies on `ot->prop` being set, so even if this is not aboslutely needed anymore (when defining UI you can specify an arbitrary enum property by name), `ot->prop` shall be set. Note fix commit for mismatches between menu entries and shortcuts is needed next. |
Commit Details:
Full Hash: 945ea40887bafff14ad40644b8a86af28bc1ae5c
Parent Commit: 79ba5e5
Lines Changed: +101, -19
1 Modified Path:
/source/blender/windowmanager/intern/wm_keymap.c (+101, -19) (Diff)