diff options
author | alberth <alberth@openttd.org> | 2009-11-29 21:14:34 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2009-11-29 21:14:34 +0000 |
commit | 5187a5980bcda6b37e30b755efed8aa3bbe936f0 (patch) | |
tree | f1ebfb274cfdf4ccb59bb632b6ea4d0e75d21e94 /src/window.cpp | |
parent | 8a8bf6c53dfd4dcf0515526c5f9f4d0b7dcfa839 (diff) | |
download | openttd-5187a5980bcda6b37e30b755efed8aa3bbe936f0.tar.xz |
(svn r18345) -Codechange: Warn the window that it gets initialized, so it can do some work ahead.
Diffstat (limited to 'src/window.cpp')
-rw-r--r-- | src/window.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/window.cpp b/src/window.cpp index 95dcce7a0..5e9d22e1b 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -491,6 +491,7 @@ void Window::ReInit(int rx, int ry) int window_width = this->width; int window_height = this->height; + this->OnInit(); /* Re-initialize the window from the ground up. No need to change the nested_array, as all widgets stay where they are. */ this->nested_root->SetupSmallestSize(this, false); this->nested_root->AssignSizePosition(ST_SMALLEST, 0, 0, this->nested_root->smallest_x, this->nested_root->smallest_y, _dynlang.text_dir == TD_RTL); @@ -786,7 +787,8 @@ void Window::InitializeData(WindowClass cls, int window_number, uint32 desc_flag this->window_number = window_number; this->desc_flags = desc_flags; - /* If available, initialize nested widget tree. */ + this->OnInit(); + /* Initialize nested widget tree. */ if (this->nested_array == NULL) { this->nested_array = CallocT<NWidgetBase *>(this->nested_array_size); this->nested_root->SetupSmallestSize(this, true); |