diff options
author | Ton Roosendaal <ton@blender.org> | 2010-12-19 17:39:36 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2010-12-19 17:39:36 +0300 |
commit | 6cdc631d98f0f81dc9c7c07a122430ce285cc709 (patch) | |
tree | 29d1573cfe6c07795fc792d13b319bbd97abeb55 /source | |
parent | d7c007c4d5c029eab61ab24c2e68b745de4257cc (diff) |
Todo item: (Luca report in IRC)
Pulldown and other popup menus: this button type exits on release.
While holding mouse you then can move around, but the highlight of button
didn't disappear if you were outside item. The menu then doesn't close
when you release the mouse.
Now highlight goes on/off on mouse moves to show this better.
Implementation note: menu items are coded similar to regular activate
buttons (like for tools). There's no provision to make highlights go
to the next item while holding mouse in menus. That I rather not mess
with now.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/interface/interface_handlers.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index d66f7d262a9..1f701ca56f8 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -5196,16 +5196,17 @@ static int ui_handle_button_event(bContext *C, wmEvent *event, uiBut *but) } else { /* deselect the button when moving the mouse away */ + /* also de-activate for buttons that only show higlights */ if(ui_mouse_inside_button(ar, but, event->x, event->y)) { if(!(but->flag & UI_SELECT)) { - but->flag |= UI_SELECT; + but->flag |= (UI_SELECT|UI_ACTIVE); data->cancel= 0; ED_region_tag_redraw(data->region); } } else { if(but->flag & UI_SELECT) { - but->flag &= ~UI_SELECT; + but->flag &= ~(UI_SELECT|UI_ACTIVE); data->cancel= 1; ED_region_tag_redraw(data->region); } |