Changeset - r17695:d85869b17a25
[Not reviewed]
master
0 1 0
frosch - 13 years ago 2011-05-21 22:23:13
frosch@openttd.org
(svn r22485) -Fix: EnsureVisibleCaption() did not update viewport positions of windows with viewports but without caption. (only triggerable since r22484)
1 file changed with 6 insertions and 5 deletions:
0 comments (0 inline, 0 general)
src/window.cpp
Show inline comments
 
@@ -1550,12 +1550,13 @@ static void EnsureVisibleCaption(Window 
 
		/* 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;
 
}
0 comments (0 inline, 0 general)