From 3f3a14d24b95efe532e04c98ed5f568e97849fbb Mon Sep 17 00:00:00 2001 From: KUDr Date: Sun, 3 Dec 2006 13:40:16 +0000 Subject: (svn r7329) -Fix (r7157): Invalid viewport position on quick zoom --- main_gui.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'main_gui.c') diff --git a/main_gui.c b/main_gui.c index edfafbe20..8ecd7c988 100644 --- a/main_gui.c +++ b/main_gui.c @@ -881,7 +881,10 @@ bool DoZoomInOutWindow(int how, Window *w) 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); -- cgit v1.2.3-70-g09d2