diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-02-05 09:04:06 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-02-05 09:04:14 +0300 |
commit | 38420f19b6ebfac05955dac61200ce686fcd16e5 (patch) | |
tree | fb2d1bd5ae78a0947b006da3b57de2c36df827cf /source/blender/editors/space_image | |
parent | f2bf5acd5824673e4a7d641c833ec6940e6b5bea (diff) |
Cleanup: rename USER_ZOOM_{CONT->CONTINUE} improve comments
USER_ZOOM_CONT only had comments saying this was 'oldstyle',
remove these comments, add brief explanations of the zoom style
in the enum.
Diffstat (limited to 'source/blender/editors/space_image')
-rw-r--r-- | source/blender/editors/space_image/image_ops.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index 30614a5bf88..9b8bf3c2fee 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -467,7 +467,7 @@ static void image_view_zoom_init(bContext *C, wmOperator *op, const wmEvent *eve UI_view2d_region_to_view( ®ion->v2d, event->mval[0], event->mval[1], &vpd->location[0], &vpd->location[1]); - if (U.viewzoom == USER_ZOOM_CONT) { + if (U.viewzoom == USER_ZOOM_CONTINUE) { /* needs a timer to continue redrawing */ vpd->timer = WM_event_add_timer(CTX_wm_manager(C), CTX_wm_window(C), TIMER, 0.01f); vpd->timer_lastdraw = PIL_check_seconds_timer(); @@ -579,12 +579,10 @@ static void image_zoom_apply(ViewZoomData *vpd, delta = -delta; } - if (viewzoom == USER_ZOOM_CONT) { + if (viewzoom == USER_ZOOM_CONTINUE) { double time = PIL_check_seconds_timer(); float time_step = (float)(time - vpd->timer_lastdraw); float zfac; - - /* oldstyle zoom */ zfac = 1.0f + ((delta / 20.0f) * time_step); vpd->timer_lastdraw = time; /* this is the final zoom, but instead make it into a factor */ |