summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-10-23 21:10:24 +0000
committerrubidium <rubidium@openttd.org>2009-10-23 21:10:24 +0000
commit77d26d508114d96f37940ec83e040b3e31051136 (patch)
treea8498b51ebc52300f2366104e48e8c416f9d288e /src
parentf6129d605dc9e806d0134e426c4a7c69736968d3 (diff)
downloadopenttd-77d26d508114d96f37940ec83e040b3e31051136.tar.xz
(svn r17848) -Codechange: allow overriding (some) settings of STACKED_SELECTION_ZERO_SIZE widgets via UpdateWidgetSize
Diffstat (limited to 'src')
-rw-r--r--src/widget.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/widget.cpp b/src/widget.cpp
index bf11a2912..880a94ae5 100644
--- a/src/widget.cpp
+++ b/src/widget.cpp
@@ -1291,12 +1291,19 @@ void NWidgetStacked::SetupSmallestSize(Window *w, bool init_array)
/* Zero size plane selected */
if (this->shown_plane == STACKED_SELECTION_ZERO_SIZE) {
- this->smallest_x = 0;
- this->smallest_y = 0;
this->fill_x = false;
this->fill_y = false;
- this->resize_x = 0;
- this->resize_y = 0;
+
+ Dimension size = {0, 0};
+ Dimension resize = {0, 0};
+ Dimension padding = {0, 0};
+ /* Here we're primarily interested in the value of resize */
+ w->UpdateWidgetSize(this->index, &size, padding, &resize);
+
+ this->smallest_x = size.width;
+ this->smallest_y = size.height;
+ this->resize_x = resize.width;
+ this->resize_y = resize.height;
return;
}