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:
authorJustin Jones <jjones780>2019-01-10 17:46:44 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-01-10 17:55:34 +0300
commitdb36eff9f7d1eea8ed93434bdb679c37e31681db (patch)
treeea790b0ee8371dfac928952324a131cd14130104 /source/blender/editors/interface
parentf572a157ba7846940012271a030de89db0a93c33 (diff)
UI: make pie menus stick only when tapping key.
When holding down the key for a while, the pie menu will disappear when releasing the key. This is under the assumption that in this case the user decided to cancel the action. Differential Revision: https://developer.blender.org/D4180
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r--source/blender/editors/interface/interface_handlers.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 32cd22b0368..f649cfb04e2 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -9320,6 +9320,7 @@ static int ui_pie_handler(bContext *C, const wmEvent *event, uiPopupBlockHandle
ui_window_to_block_fl(ar, block, &event_xy[0], &event_xy[1]);
+ /* Distance from initial point. */
dist = ui_block_calc_pie_segment(block, event_xy);
if (but && button_modal_state(but->active->state)) {
@@ -9404,8 +9405,9 @@ static int ui_pie_handler(bContext *C, const wmEvent *event, uiPopupBlockHandle
ED_region_tag_redraw(ar);
}
else {
- /* distance from initial point */
- if (!(block->pie_data.flags & UI_PIE_DRAG_STYLE)) {
+ if ((duration < 0.01 * U.pie_tap_timeout) &&
+ !(block->pie_data.flags & UI_PIE_DRAG_STYLE))
+ {
block->pie_data.flags |= UI_PIE_CLICK_STYLE;
}
else {