Skip to content

Commit 612b300

Browse files
Fix calling dt_dev_zoom_move() params
The 'closeup' parameter is an 'int' so we don't want to pass bools. log readability fixes.
1 parent fa6ddb6 commit 612b300

4 files changed

Lines changed: 9 additions & 8 deletions

File tree

src/develop/develop.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1042,7 +1042,7 @@ void dt_dev_configure(dt_dev_viewport_t *port)
10421042
port->width = wd;
10431043
port->height = ht;
10441044
port->pipe->changed |= DT_DEV_PIPE_ZOOMED;
1045-
dt_dev_zoom_move(port, DT_ZOOM_MOVE, 0.0f, TRUE, 0.0f, 0.0f, TRUE);
1045+
dt_dev_zoom_move(port, DT_ZOOM_MOVE, 0.0f, 1, 0.0f, 0.0f, TRUE);
10461046
}
10471047
}
10481048

@@ -3261,9 +3261,10 @@ void dt_dev_zoom_move(dt_dev_viewport_t *port,
32613261
return;
32623262

32633263
dt_print_pipe(DT_DEBUG_PIPE | DT_DEBUG_CONTROL | DT_DEBUG_VERBOSE,
3264-
"dt_dev_zoom_move sets DT_DEV_PIPE_ZOOMED", port->pipe, NULL, DT_DEVICE_NONE, NULL, NULL, "%s%s",
3265-
port->widget ? "redraw_widget " : "",
3266-
port == &dev->full ? "navigation_redraw" : "");
3264+
"dt_dev_zoom_move", port->pipe, NULL, DT_DEVICE_NONE, NULL, NULL,
3265+
"set DT_DEV_PIPE_ZOOMED%s%s",
3266+
port->widget ? ", redraw_widget" : "",
3267+
port == &dev->full ? ", navigation_redraw" : "");
32673268
// Mark pipe as needing zoom update
32683269
port->pipe->changed |= DT_DEV_PIPE_ZOOMED;
32693270

src/libs/navigation.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ static void _lib_navigation_scroll_callback(GtkEventControllerScroll *controller
545545
event->scroll.x, event->scroll.y,
546546
&x, &y))
547547
dt_dev_zoom_move(&darktable.develop->full, DT_ZOOM_SCROLL,
548-
0.0f, dy < 0, x, y, constrain);
548+
0.0f, dy < 0 ? 1 : 0, x, y, constrain);
549549
}
550550
gdk_event_free(event);
551551
}

src/views/darkroom.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3546,7 +3546,7 @@ void enter(dt_view_t *self)
35463546
}
35473547

35483548
// image should be there now.
3549-
dt_dev_zoom_move(&dev->full, DT_ZOOM_MOVE, -1.f, TRUE, 0.0f, 0.0f, TRUE);
3549+
dt_dev_zoom_move(&dev->full, DT_ZOOM_MOVE, -1.f, 1, 0.0f, 0.0f, TRUE);
35503550

35513551
/* connect signal for filmstrip image activate */
35523552
DT_CONTROL_SIGNAL_HANDLE(DT_SIGNAL_VIEWMANAGER_THUMBTABLE_ACTIVATE,
@@ -4567,7 +4567,7 @@ static gboolean _second_window_scrolled_callback(GtkWidget *widget,
45674567

45684568
const gboolean constrained =
45694569
dev->constrain_zoom && !dt_modifier_is(event->state, GDK_CONTROL_MASK);
4570-
dt_dev_zoom_move(port, DT_ZOOM_SCROLL, 0.0f, delta_y < 0,
4570+
dt_dev_zoom_move(port, DT_ZOOM_SCROLL, 0.0f, delta_y < 0 ? 1 : 0,
45714571
event->x, event->y, constrained);
45724572
}
45734573

src/views/view.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1978,7 +1978,7 @@ void dt_view_paint_surface(cairo_t *cr,
19781978
if(use_preview_fallback)
19791979
{
19801980
dt_print_pipe(DT_DEBUG_PIPE | DT_DEBUG_EXPOSE | DT_DEBUG_VERBOSE,
1981-
"dt_view_paint_surface sets DT_DEV_PIPE_ZOOMED", port->pipe, NULL, DT_DEVICE_NONE, NULL, NULL);
1981+
"dt_view_paint_surface", port->pipe, NULL, DT_DEVICE_NONE, NULL, NULL, "preview fallback set DT_DEV_PIPE_ZOOMED");
19821982
port->pipe->changed |= DT_DEV_PIPE_ZOOMED;
19831983
if(port->pipe->status == DT_DEV_PIXELPIPE_VALID)
19841984
port->pipe->status = DT_DEV_PIXELPIPE_DIRTY;

0 commit comments

Comments
 (0)