Skip to content

Commit

Permalink
Store last used scale for all images
Browse files Browse the repository at this point in the history
Resolves #205.

Signed-off-by: Artem Senichev <[email protected]>
  • Loading branch information
artemsen committed Oct 26, 2024
1 parent 41f63ea commit 1018ee3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/viewer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1018ee3

Please sign in to comment.