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
path: root/source
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2013-01-10 15:08:38 +0400
committerTon Roosendaal <ton@blender.org>2013-01-10 15:08:38 +0400
commitbed36187802eaa1acc59516b338eb3ec2b8038bb (patch)
treee2cb9799b586609ccd44801e52fa3b5e64261f38 /source
parent860d42b9a33b2f348f962f3f41f6fa171cd1f1ce (diff)
Bug fix 33732
Modal operators with hardcoded (in C) event handling now don't get double clicks anymore. For modal keymaps things work OK. This fixes number input typing for CTRL+B bevel, for example.
Diffstat (limited to 'source')
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index edf5700673c..48cad9e020b 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -1345,6 +1345,15 @@ static void wm_event_modalkeymap(const bContext *C, wmOperator *op, wmEvent *eve
}
}
}
+ else {
+ /* modal keymap checking returns handled events fine, but all hardcoded modal
+ handling typically swallows all events (OPERATOR_RUNNING_MODAL).
+ This bypass just disables support for double clicks in hardcoded modal handlers */
+ if (event->val == KM_DBL_CLICK) {
+ event->prevval = event->val;
+ event->val = KM_PRESS;
+ }
+ }
}
/* bad hacking event system... better restore event type for checking of KM_CLICK for example */
@@ -1357,6 +1366,8 @@ static void wm_event_modalmap_end(wmEvent *event)
event->val = event->prevval;
event->prevval = 0;
}
+ else if (event->prevval == KM_DBL_CLICK)
+ event->val = KM_DBL_CLICK;
}