Changeset - r20840:a8b75ffac7ef
[Not reviewed]
master
0 1 0
frosch - 11 years ago 2013-10-19 15:28:54
frosch@openttd.org
(svn r25884) -Fix: Resizing the window did not properly resize the viewport window, resulting in the link graph glitching.
1 file changed with 1 insertions and 10 deletions:
0 comments (0 inline, 0 general)
src/window.cpp
Show inline comments
 
@@ -3378,19 +3378,10 @@ void RelocateAllWindows(int neww, int ne
 

	
 
	FOR_ALL_WINDOWS_FROM_BACK(w) {
 
		int left, top;
 

	
 
		if (w->window_class == WC_MAIN_WINDOW) {
 
			ViewPort *vp = w->viewport;
 
			vp->width = w->width = neww;
 
			vp->height = w->height = newh;
 
			vp->virtual_width = ScaleByZoom(neww, vp->zoom);
 
			vp->virtual_height = ScaleByZoom(newh, vp->zoom);
 
			continue; // don't modify top,left
 
		}
 

	
 
		/* XXX - this probably needs something more sane. For example specifying
 
		 * in a 'backup'-desc that the window should always be centered. */
 
		switch (w->window_class) {
 
			case WC_MAIN_WINDOW:
 
			case WC_BOOTSTRAP:
 
				ResizeWindow(w, neww, newh);
 
				continue;
0 comments (0 inline, 0 general)