mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-07-15 08:35:11 +01:00
(svn r7329) -Fix (r7157): Invalid viewport position on quick zoom
This commit is contained in:
parent
306204c71d
commit
3f3a14d24b
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user