diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-11-18 14:14:55 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-11-18 14:21:55 +0300 |
commit | bbd4613ed94931cd5443309d98ab8e112b64b93a (patch) | |
tree | 08eef1a803eb3992a62b6372ddea398cd23a09c7 /source/blender/editors/interface | |
parent | c1e1ea5b8fc00aa4852f6be0231fa3041845c136 (diff) |
Keymaps: make click event use position on button press rather than release.
This may improve reliability with left click select and pen input, assuming
that the place where the pen first touched the surface is closer to the
intended location than where it was released from the surface.
I'm not sure if this will make a significant difference in practice, but it
seems worth a try.
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r-- | source/blender/editors/interface/interface_region_menu_pie.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/source/blender/editors/interface/interface_region_menu_pie.c b/source/blender/editors/interface/interface_region_menu_pie.c index 6887235f5db..b7fc1055154 100644 --- a/source/blender/editors/interface/interface_region_menu_pie.c +++ b/source/blender/editors/interface/interface_region_menu_pie.c @@ -152,15 +152,9 @@ uiPieMenu *UI_pie_menu_begin(struct bContext *C, const char *title, int icon, co pie->layout = UI_block_layout(pie->block_radial, UI_LAYOUT_VERTICAL, UI_LAYOUT_PIEMENU, 0, 0, 200, 0, 0, style); - /* Open from where we started dragging. */ - if (event->val == KM_CLICK_DRAG) { - pie->mx = event->prevclickx; - pie->my = event->prevclicky; - } - else { - pie->mx = event->x; - pie->my = event->y; - } + /* Note event->x/y is where we started dragging in case of KM_CLICK_DRAG. */ + pie->mx = event->x; + pie->my = event->y; /* create title button */ if (title[0]) { |