Fix: use click style if a pie was spawned by release or click event

This commit is contained in:
Aleksandr Zinovev 2017-07-27 10:13:40 +03:00
parent 5c963128ea
commit 3e8b2288f5
1 changed files with 2 additions and 2 deletions

View File

@ -2952,8 +2952,8 @@ uiPieMenu *UI_pie_menu_begin(struct bContext *C, const char *title, int icon, co
pie->block_radial->puphash = ui_popup_menu_hash(title);
pie->block_radial->flag |= UI_BLOCK_RADIAL;
/* if pie is spawned by a left click, it is always assumed to be click style */
if (event->type == LEFTMOUSE) {
/* if pie is spawned by a left click, release or click event, it is always assumed to be click style */
if (event->type == LEFTMOUSE || ELEM(event->val, KM_RELEASE, KM_CLICK)) {
pie->block_radial->pie_data.flags |= UI_PIE_CLICK_STYLE;
pie->block_radial->pie_data.event = EVENT_NONE;
win->lock_pie_event = EVENT_NONE;