mirror of https://github.com/OpenTTD/OpenTTD
(svn r7329) -Fix (r7157): Invalid viewport position on quick zoom
parent
306204c71d
commit
3f3a14d24b
|
@ -881,7 +881,10 @@ bool DoZoomInOutWindow(int how, Window *w)
|
||||||
vp->virtual_height <<= 1;
|
vp->virtual_height <<= 1;
|
||||||
break;
|
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);
|
SetWindowDirty(w);
|
||||||
/* Update the windows that have zoom-buttons to perhaps disable their buttons */
|
/* Update the windows that have zoom-buttons to perhaps disable their buttons */
|
||||||
SendWindowMessageClass(w->window_class, how, w->window_number, 0);
|
SendWindowMessageClass(w->window_class, how, w->window_number, 0);
|
||||||
|
|
Loading…
Reference in New Issue