src/window.cpp
branchnoai
changeset 10249 58810805030e
parent 10181 54df587fef5d
child 10294 7798ae816af8
--- a/src/window.cpp	Thu Apr 17 08:40:01 2008 +0000
+++ b/src/window.cpp	Fri Apr 18 23:33:51 2008 +0000
@@ -19,6 +19,7 @@
 #include "map_func.h"
 #include "vehicle_base.h"
 #include "settings_type.h"
+#include "cheat_func.h"
 
 #include "table/sprites.h"
 
@@ -1037,7 +1038,6 @@
 	IConsoleClose();
 
 	_last_z_window = _z_windows;
-	InitViewports();
 	_no_scroll = 0;
 }
 
@@ -2316,7 +2316,7 @@
 
 				const Window *wt = FindWindowById(WC_MAIN_TOOLBAR, 0);
 				if (wt != NULL) {
-					if (top < wt->height) top = wt->height;
+					if (top < wt->height && wt->left < (w->left + w->width) && (wt->left + wt->width) > w->left) top = wt->height;
 					if (top >= newh) top = newh - 1;
 				} else {
 					if (top < 0) top = 0;