Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-05-02 13:02:50 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-05-02 13:02:50 +0300
commit62ed13340b4393a3074d1bc0f112089a31628c08 (patch)
tree126d619d993aa67cb4e905a18f2446893d5989e4 /source
parent31d5fcd2a7271568b1f70713267185c4601c7f41 (diff)
UI: don't allow disabled popovers to open w/ drag
First dragging over active menu items could be used to open a disabled popover.
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/interface/interface_handlers.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 622c76079c0..e0ee966cb34 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -10008,8 +10008,10 @@ static int ui_handler_region_menu(bContext *C, const wmEvent *event, void *UNUSE
{
/* if mouse moves to a different root-level menu button,
* open it to replace the current menu */
- ui_handle_button_activate(C, ar, but_other, BUTTON_ACTIVATE_OVER);
- button_activate_state(C, but_other, BUTTON_STATE_MENU_OPEN);
+ if ((but_other->flag & UI_BUT_DISABLED) == 0) {
+ ui_handle_button_activate(C, ar, but_other, BUTTON_ACTIVATE_OVER);
+ button_activate_state(C, but_other, BUTTON_STATE_MENU_OPEN);
+ }
}
else if (data->state == BUTTON_STATE_MENU_OPEN) {
int retval;