diff options
author | Ton Roosendaal <ton@blender.org> | 2011-01-30 16:51:02 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2011-01-30 16:51:02 +0300 |
commit | 02458c0d4b16032d41a09d466efaf08381cb577a (patch) | |
tree | 805c5ff8c37e1394bb2b1cc2ced055c54c5e6a71 /source/blender/editors/interface | |
parent | c7834e0e6e12cd613d645f2178ea0495a28592ab (diff) |
Bugfix #25840
UI bug: when a button has an open menu, the menu closed on any
mouse-over of other buttons in this panel. That's not too bad,
but it didn't check for whether the mouse was already inside the
menu itself (respecting safety region).
The bug showed error on zoomed in UI, using FPS presets, in case
the menu-button was drawing aligned with other buttons. A real
boundary case... :)
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r-- | source/blender/editors/interface/interface_handlers.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 222cce15f6f..b802098ff10 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -5238,8 +5238,15 @@ static int ui_handle_button_event(bContext *C, wmEvent *event, uiBut *but) retval= WM_UI_HANDLER_CONTINUE; } else if(data->state == BUTTON_STATE_MENU_OPEN) { + /* check for exit because of mouse-over another button */ switch(event->type) { - case MOUSEMOVE: { + case MOUSEMOVE: + + if(data->menu && data->menu->region) + if(ui_mouse_inside_region(data->menu->region, event->x, event->y)) + break; + + { uiBut *bt= ui_but_find_mouse_over(ar, event->x, event->y); if(bt && bt->active != data) { |