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/interface/interface_intern.h | |
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/interface/interface_intern.h')
-rw-r--r-- | source/blender/editors/interface/interface_intern.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h index b1ca0fa4e92..1c79d3218fb 100644 --- a/source/blender/editors/interface/interface_intern.h +++ b/source/blender/editors/interface/interface_intern.h @@ -74,6 +74,12 @@ enum { UI_SELECT_DRAW = (1 << 5), /** Property search filter is active and the button does not match. */ UI_SEARCH_FILTER_NO_MATCH = (1 << 6), + + /** Temporarily override the active button for lookups in context, regions, etc. (everything + * using #ui_context_button_active()). For example, so that operators normally acting on the + * active button can be polled on non-active buttons to (e.g. for disabling). */ + UI_BUT_ACTIVE_OVERRIDE = (1 << 7), + /* WARNING: rest of #uiBut.flag in UI_interface.h */ }; |