main_gui.c
changeset 5214 521e6d945e5d
parent 5118 5a56a0f12206
child 5235 3c309f43f0a6
--- a/main_gui.c	Sun Dec 03 13:06:49 2006 +0000
+++ b/main_gui.c	Sun Dec 03 13:40:16 2006 +0000
@@ -881,7 +881,10 @@
 			vp->virtual_height <<= 1;
 			break;
 	}
-
+	if (vp != NULL) { // the vp can be null when how == ZOOM_NONE
+		vp->virtual_left = WP(w, vp_d).scrollpos_x;
+		vp->virtual_top = WP(w, vp_d).scrollpos_y;
+	}
 	SetWindowDirty(w);
 	/* Update the windows that have zoom-buttons to perhaps disable their buttons */
 	SendWindowMessageClass(w->window_class, how, w->window_number, 0);