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
diff options
context:
space:
mode:
authorAntony Riakiotakis <kalast@gmail.com>2014-10-13 21:55:19 +0400
committerAntony Riakiotakis <kalast@gmail.com>2014-10-13 21:55:19 +0400
commitaf346f991827fef81b21fe30370d84bc338d6461 (patch)
treece7486fc34ba3bd19f6d7f37de5c85e67730abff /source/blender/editors/interface/interface_regions.c
parent02175027f298c47171d59fc9755e4cc7ca53f284 (diff)
Some corrections to the pie spawning code to account for nested pies.
Diffstat (limited to 'source/blender/editors/interface/interface_regions.c')
-rw-r--r--source/blender/editors/interface/interface_regions.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c
index 49823d4e472..e743cb50a83 100644
--- a/source/blender/editors/interface/interface_regions.c
+++ b/source/blender/editors/interface/interface_regions.c
@@ -2729,17 +2729,20 @@ uiPieMenu *uiPieMenuBegin(struct bContext *C, const char *title, int icon, const
pie->block_radial->puphash = ui_popup_menu_hash(title);
pie->block_radial->flag |= UI_BLOCK_RADIAL;
- if (win->last_pie_event != EVENT_NONE)
- event_type = win->last_pie_event;
- else
- event_type = event->type;
-
- pie->block_radial->pie_data.event = event_type;
- win->lock_pie_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;
+ if (event->type == LEFTMOUSE) {
+ pie->block_radial->pie_data.flags |= UI_PIE_CLICK_STYLE;
+ pie->block_radial->pie_data.event = EVENT_NONE;
+ win->lock_pie_event = EVENT_NONE;
+ }
+ else {
+ if (win->last_pie_event != EVENT_NONE)
+ event_type = win->last_pie_event;
+ else
+ event_type = event->type;
+
+ pie->block_radial->pie_data.event = event_type;
+ win->lock_pie_event = event_type;
}
pie->layout = uiBlockLayout(pie->block_radial, UI_LAYOUT_VERTICAL, UI_LAYOUT_PIEMENU, 0, 0, 200, 0, 0, style);