Fix: use click style if a pie was spawned by release or click event
This commit is contained in:
@@ -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->puphash = ui_popup_menu_hash(title);
|
||||||
pie->block_radial->flag |= UI_BLOCK_RADIAL;
|
pie->block_radial->flag |= UI_BLOCK_RADIAL;
|
||||||
|
|
||||||
/* if pie is spawned by a left click, it is always assumed to be click style */
|
/* if pie is spawned by a left click, release or click event, it is always assumed to be click style */
|
||||||
if (event->type == LEFTMOUSE) {
|
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.flags |= UI_PIE_CLICK_STYLE;
|
||||||
pie->block_radial->pie_data.event = EVENT_NONE;
|
pie->block_radial->pie_data.event = EVENT_NONE;
|
||||||
win->lock_pie_event = EVENT_NONE;
|
win->lock_pie_event = EVENT_NONE;
|
||||||
|
Reference in New Issue
Block a user