From 1018ee3e485311dc4a7f144374e0943d8cd7f901 Mon Sep 17 00:00:00 2001 From: Artem Senichev Date: Sat, 26 Oct 2024 12:05:55 +0300 Subject: [PATCH] Store last used scale for all images Resolves #205. Signed-off-by: Artem Senichev --- src/viewer.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/viewer.c b/src/viewer.c index 933b37c..cf2769b 100644 --- a/src/viewer.c +++ b/src/viewer.c @@ -231,6 +231,8 @@ static void scale_image(enum fixed_scale sc) break; } + ctx.scale_init = sc; + // center viewport ctx.img_x = wnd_width / 2 - (ctx.scale * pm->width) / 2; ctx.img_y = wnd_height / 2 - (ctx.scale * pm->height) / 2;