summaryrefslogtreecommitdiff
path: root/src/widget.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-12-10 20:05:20 +0000
committerrubidium <rubidium@openttd.org>2010-12-10 20:05:20 +0000
commitc1efcb76cace2ef00d14f78613e991ea4009fa0d (patch)
treeff35732afb2c86e6fced5ac369952ffebaefffcb /src/widget.cpp
parent84b405734278c0a141c7271fcf2f90387a6de42b (diff)
downloadopenttd-c1efcb76cace2ef00d14f78613e991ea4009fa0d.tar.xz
(svn r21451) -Fix (r21449): make sure the matrix's child widget's size is updated with the right widget index
Diffstat (limited to 'src/widget.cpp')
-rw-r--r--src/widget.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/widget.cpp b/src/widget.cpp
index 45825db8f..d1e9bea85 100644
--- a/src/widget.cpp
+++ b/src/widget.cpp
@@ -1418,6 +1418,8 @@ void NWidgetMatrix::SetupSmallestSize(Window *w, bool init_array)
w->nested_array[this->index] = this;
}
+ /* Reset the widget number. */
+ SB(dynamic_cast<NWidgetCore *>(this->head)->index, 16, 16, 0);
this->head->SetupSmallestSize(w, init_array);
Dimension padding = {this->pip_pre + this->pip_post, this->pip_pre + this->pip_post};