diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2014-10-09 20:37:54 +0400 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2014-10-09 20:38:10 +0400 |
commit | 0609aee4db0da33dcdb404d8285b093b21325deb (patch) | |
tree | 94cfc29ac2e93c8f9b3cec2f1b789c598effbb13 /source/blender/editors/interface/interface_regions.c | |
parent | 9f18e4f0eb81b7e4ab62f361e1d0c668a8b5eb35 (diff) |
Fix T41639, hierarchical pie menu - popup interaction is buggy.
Basically, this commit changes pie menu click interaction so that
confirmation is done on left click release instead of press. This allows
dragging on the pie menu to select different items, but most
importantly, there should be no left over click events passed on to
subsequent menus/pies. This means that pie menus should now be able to
spawn popups safely. Also, left clicking to spawn a second pie menu now
sets that menu to click style by default allowing for better interaction
between hierarhies of pie menus.
Diffstat (limited to 'source/blender/editors/interface/interface_regions.c')
-rw-r--r-- | source/blender/editors/interface/interface_regions.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c index 9b450b8fdf4..5739ebebe64 100644 --- a/source/blender/editors/interface/interface_regions.c +++ b/source/blender/editors/interface/interface_regions.c @@ -2720,6 +2720,11 @@ uiPieMenu *uiPieMenuBegin(struct bContext *C, const char *title, int icon, const pie->block_radial->flag |= UI_BLOCK_RADIAL; pie->block_radial->pie_data.event = event->type; + /* if pie is spawned by a left click, it is always assumed to be click style */ + if (event->type == LEFTMOUSE) { + pie->block_radial->flag |= UI_PIE_CLICK_STYLE; + } + pie->layout = uiBlockLayout(pie->block_radial, UI_LAYOUT_VERTICAL, UI_LAYOUT_PIEMENU, 0, 0, 200, 0, 0, style); pie->mx = event->x; pie->my = event->y; |