summaryrefslogtreecommitdiff
path: root/src/window.cpp
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2009-07-12 12:19:41 +0000
committeralberth <alberth@openttd.org>2009-07-12 12:19:41 +0000
commit9efd32d13ce11aedf020cd2ce9eddc2ccaa72d32 (patch)
tree92eabbfe0803a88ac29ae6d9dfcd51c000ffb2ca /src/window.cpp
parentc94c18fc0ad33c89583cd5fa4158a4abd89fd07e (diff)
downloadopenttd-9efd32d13ce11aedf020cd2ce9eddc2ccaa72d32.tar.xz
(svn r16798) -Fix [FS#3016]: Added several new widget distances for better widget size computations.
Diffstat (limited to 'src/window.cpp')
-rw-r--r--src/window.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/window.cpp b/src/window.cpp
index 13bc7be1b..f46bf08da 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -1337,6 +1337,8 @@ void InitWindowSystem()
_focused_window = NULL;
_mouseover_last_w = NULL;
_scrolling_viewport = 0;
+
+ NWidgetLeaf::InvalidateDimensionCache(); // Reset cached sizes of several widgets.
}
/**
@@ -2546,8 +2548,9 @@ void HideVitalWindows()
/** Re-initialize all windows. */
void ReInitAllWindows()
{
- Window *w;
+ NWidgetLeaf::InvalidateDimensionCache(); // Reset cached sizes of several widgets.
+ Window *w;
FOR_ALL_WINDOWS_FROM_BACK(w) {
w->ReInit();
}