Fix: use click style if a pie was spawned by release or click event
authorAleksandr Zinovev <roaoao@gmail.com>
Thu, 27 Jul 2017 07:13:40 +0000 (10:13 +0300)
committerAleksandr Zinovev <roaoao@gmail.com>
Thu, 27 Jul 2017 07:13:40 +0000 (10:13 +0300)
source/blender/editors/interface/interface_regions.c

index 5ed944747263419c73616bd0968fc53c333bfa1b..18ababbb657009ba8b3c3faf30b55a4bcebba582 100644 (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;