summaryrefslogtreecommitdiff
path: root/src/osk_gui.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-11-15 13:36:30 +0000
committerrubidium <rubidium@openttd.org>2009-11-15 13:36:30 +0000
commitaeb9f8e715c1a11c926d13eaf8cd39b0d0caa3fd (patch)
treef8628644f4b190863dd814ba1f4ff4e74b74a363 /src/osk_gui.cpp
parent7337a0553c28e4b95c3d6bdfba42da84f7c842ee (diff)
downloadopenttd-aeb9f8e715c1a11c926d13eaf8cd39b0d0caa3fd.tar.xz
(svn r18092) -Codechange: remove support for the unnested widgets
Diffstat (limited to 'src/osk_gui.cpp')
-rw-r--r--src/osk_gui.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/osk_gui.cpp b/src/osk_gui.cpp
index a9897b3b4..f3b21a650 100644
--- a/src/osk_gui.cpp
+++ b/src/osk_gui.cpp
@@ -75,14 +75,9 @@ struct OskWindow : public Window {
this->parent = parent;
assert(parent != NULL);
- if (parent->widget != NULL) {
- this->caption = (parent->widget[button].data != STR_NULL) ? parent->widget[button].data : parent->caption;
- }
- if (parent->nested_array != NULL) {
- NWidgetCore *par_wid = parent->GetWidget<NWidgetCore>(button);
- assert(par_wid != NULL);
- this->caption = (par_wid->widget_data != STR_NULL) ? par_wid->widget_data : parent->caption;
- }
+ NWidgetCore *par_wid = parent->GetWidget<NWidgetCore>(button);
+ assert(par_wid != NULL);
+ this->caption = (par_wid->widget_data != STR_NULL) ? par_wid->widget_data : parent->caption;
this->qs = parent;
this->text_btn = button;