# HG changeset patch # User KUDr # Date 1165153216 0 # Node ID 1733d5a05c5932d1835b0906fa7dd7c23e474d8d # Parent 396011cdd62afffd9e652b4a1a5fdd8a2f77484b (svn r7329) -Fix (r7157): Invalid viewport position on quick zoom diff --git a/main_gui.c b/main_gui.c --- a/main_gui.c +++ b/main_gui.c @@ -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);