diff options
author | Julian Eisel <julian@blender.org> | 2022-05-13 16:55:11 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2022-05-13 18:55:52 +0300 |
commit | 8d43ee1b0823e6e5fae2fdceaee0a94d3d61f9b7 (patch) | |
tree | af808de0186cfb0a57ced1f5445317bb20bf3d84 /source/blender/editors/include | |
parent | c2d2cd1468cd89e7aaf7770a8b89be19a83490df (diff) |
Fix T97518: All buttons with eyedropper highlight if one is hovered
Issue is that the operator acts on the active button, and also uses that in the
poll. So the actually active button would affect the poll of a different
button. For the superimposed icons we need to be able to execute these polls
properly for non-active buttons.
This enables temporarily overriding the active button for lookups via context.
While a bit of a hack it makes sense conceptually.
Reviewed By: Campbell Barton
Maniphest Tasks: T97518
Differential Revision: https://developer.blender.org/D14880
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r-- | source/blender/editors/include/UI_interface.h | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index 9f4d6815287..1b61e87b140 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -184,26 +184,26 @@ enum { /** #uiBut.flag general state flags. */ enum { - /* WARNING: the first 7 flags are internal (see #UI_SELECT definition). */ - UI_BUT_ICON_SUBMENU = 1 << 7, - UI_BUT_ICON_PREVIEW = 1 << 8, + /* WARNING: the first 8 flags are internal (see #UI_SELECT definition). */ + UI_BUT_ICON_SUBMENU = 1 << 8, + UI_BUT_ICON_PREVIEW = 1 << 9, - UI_BUT_NODE_LINK = 1 << 9, - UI_BUT_NODE_ACTIVE = 1 << 10, - UI_BUT_DRAG_LOCK = 1 << 11, + UI_BUT_NODE_LINK = 1 << 10, + UI_BUT_NODE_ACTIVE = 1 << 11, + UI_BUT_DRAG_LOCK = 1 << 12, /** Grayed out and un-editable. */ - UI_BUT_DISABLED = 1 << 12, + UI_BUT_DISABLED = 1 << 13, - UI_BUT_ANIMATED = 1 << 13, - UI_BUT_ANIMATED_KEY = 1 << 14, - UI_BUT_DRIVEN = 1 << 15, - UI_BUT_REDALERT = 1 << 16, + UI_BUT_ANIMATED = 1 << 14, + UI_BUT_ANIMATED_KEY = 1 << 15, + UI_BUT_DRIVEN = 1 << 16, + UI_BUT_REDALERT = 1 << 17, /** Grayed out but still editable. */ - UI_BUT_INACTIVE = 1 << 17, - UI_BUT_LAST_ACTIVE = 1 << 18, - UI_BUT_UNDO = 1 << 19, - UI_BUT_IMMEDIATE = 1 << 20, - UI_BUT_NO_UTF8 = 1 << 21, + UI_BUT_INACTIVE = 1 << 18, + UI_BUT_LAST_ACTIVE = 1 << 19, + UI_BUT_UNDO = 1 << 20, + UI_BUT_IMMEDIATE = 1 << 21, + UI_BUT_NO_UTF8 = 1 << 22, /** For popups, pressing return activates this button, overriding the highlighted button. * For non-popups this is just used as a display hint for the user to let them |