Mercurial > hg > openttd
changeset 17705:133acfffef52 draft
(svn r22485) -Fix: EnsureVisibleCaption() did not update viewport positions of windows with viewports but without caption. (only triggerable since r22484)
author | frosch <frosch@openttd.org> |
---|---|
date | Sat, 21 May 2011 22:23:13 +0000 |
parents | 1075b0791944 |
children | 29b58ef204b8 |
files | src/window.cpp |
diffstat | 1 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/window.cpp +++ b/src/window.cpp @@ -1550,12 +1550,13 @@ /* Make sure the title bar isn't hidden behind the main tool bar or the status bar. */ PreventHiding(&nx, &ny, caption_rect, FindWindowById(WC_MAIN_TOOLBAR, 0), w->left, PHD_DOWN); PreventHiding(&nx, &ny, caption_rect, FindWindowById(WC_STATUS_BAR, 0), w->left, PHD_UP); - - if (w->viewport != NULL) { - w->viewport->left += nx - w->left; - w->viewport->top += ny - w->top; - } } + + if (w->viewport != NULL) { + w->viewport->left += nx - w->left; + w->viewport->top += ny - w->top; + } + w->left = nx; w->top = ny; }