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.
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user