Mercurial > hg > openttd
changeset 5214:1733d5a05c59 draft
(svn r7329) -Fix (r7157): Invalid viewport position on quick zoom
author | KUDr <KUDr@openttd.org> |
---|---|
date | Sun, 03 Dec 2006 13:40:16 +0000 |
parents | 396011cdd62a |
children | 4d466ccfdeed |
files | main_gui.c |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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);