changeset 836:1af95bada7e7

preserve image center on refresh
author nadvornik
date Sat, 14 Jun 2008 18:41:30 +0000
parents 1014e8f72f94
children f8c22438376c
files src/layout_image.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/layout_image.c	Sat Jun 14 18:33:40 2008 +0000
+++ b/src/layout_image.c	Sat Jun 14 18:41:30 2008 +0000
@@ -1294,9 +1294,12 @@
 
 void layout_image_refresh(LayoutWindow *lw)
 {
+	gdouble sx, sy;
 	if (!layout_valid(&lw)) return;
 
+	image_get_scroll_center(lw->image, &sx, &sy);
 	image_reload(lw->image);
+	image_set_scroll_center(lw->image, sx, sy);
 }
 
 void layout_image_color_profile_set(LayoutWindow *lw,