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:
authorYevgeny Makarov <jenkm>2020-11-07 04:43:11 +0300
committerHarley Acheson <harley.acheson@gmail.com>2020-11-07 04:43:11 +0300
commitc87b7fdd8a5069256b65d9dbea83b5d4e3b5c036 (patch)
tree4fc644b339ca55b793197de79a9ea4d2d050ffba /source
parent42980abf8d0d126b0f472601cc47a3929217e394 (diff)
Fix for T65714: Pinch Zooming Crash using Mac Trackpad
Ensure that Zoom does not crash on Mac Trackpad by checking for existence of Continuous Zoom timer. Differential Revision: https://developer.blender.org/D8682 Reviewed by Julian Eisel
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/interface/view2d_ops.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c
index d8ebbbca023..de57e7fc608 100644
--- a/source/blender/editors/interface/view2d_ops.c
+++ b/source/blender/editors/interface/view2d_ops.c
@@ -1122,8 +1122,9 @@ static void view_zoomdrag_apply(bContext *C, wmOperator *op)
dy *= -1;
}
- /* continuous zoom shouldn't move that fast... */
- if (U.viewzoom == USER_ZOOM_CONT) { /* XXX store this setting as RNA prop? */
+ /* Check if the 'timer' is initialized, as zooming with the trackpad
+ * never uses the "Continuous" zoom method, and the 'timer' is not initialized. */
+ if ((U.viewzoom == USER_ZOOM_CONT) && vzd->timer) { /* XXX store this setting as RNA prop? */
const double time = PIL_check_seconds_timer();
const float time_step = (float)(time - vzd->timer_lastdraw);