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:
authorCampbell Barton <ideasman42@gmail.com>2020-01-10 08:31:25 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-01-10 08:31:25 +0300
commit6eb9cc101b7544c02ac375a21b983df531440f3d (patch)
tree679f8bbf71b541904b46d788ccd74a18db7a60c2 /source
parent0920c1684b3138ab5857edb072285b1c800ca046 (diff)
Correct last commit, restore the double-click state for modal events
Diffstat (limited to 'source')
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index b30b52fc5bb..4561b6080b5 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -2124,14 +2124,13 @@ static void wm_event_modalkeymap(const bContext *C,
* which would break when modal functions expect press/release. */
if (event->prevtype == KM_DBL_CLICK) {
event->prevtype = KM_PRESS;
+ *dbl_click_disabled = true;
}
}
}
if (event->type != EVT_MODAL_MAP) {
- /* 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 */
+ /* This bypass just disables support for double-click in modal handlers. */
if (event->val == KM_DBL_CLICK) {
event->val = KM_PRESS;
*dbl_click_disabled = true;
@@ -2166,7 +2165,8 @@ static void wm_event_modalmap_end(wmEvent *event, bool dbl_click_disabled)
event->val = event->prevval;
event->prevval = 0;
}
- else if (dbl_click_disabled) {
+
+ if (dbl_click_disabled) {
event->val = KM_DBL_CLICK;
}
}