summaryrefslogtreecommitdiff
path: root/src/misc_gui.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2012-11-14 22:50:17 +0000
committerfrosch <frosch@openttd.org>2012-11-14 22:50:17 +0000
commitf6d4200f86e93828a4a58a957d6ae7d9d5497a86 (patch)
tree2d940ae42f1f273a19c2c33f2858feab9122d9c2 /src/misc_gui.cpp
parent0ea21523556a345d38933ee2dd6dcdca0ec08514 (diff)
downloadopenttd-f6d4200f86e93828a4a58a957d6ae7d9d5497a86.tar.xz
(svn r24738) -Codechange: Remove Textbuf::Initialize in favour of a constructor.
Diffstat (limited to 'src/misc_gui.cpp')
-rw-r--r--src/misc_gui.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp
index 1391dbada..a933fb7da 100644
--- a/src/misc_gui.cpp
+++ b/src/misc_gui.cpp
@@ -828,6 +828,8 @@ struct QueryStringWindow : public QueryStringBaseWindow
*Utf8PrevChar(this->edit_str_buf + strlen(this->edit_str_buf)) = '\0';
}
+ this->text.UpdateSize();
+
if ((flags & QSF_ACCEPT_UNCHANGED) == 0) this->orig = strdup(this->edit_str_buf);
this->caption = caption;
@@ -835,7 +837,6 @@ struct QueryStringWindow : public QueryStringBaseWindow
this->ok_button = WID_QS_OK;
this->afilter = afilter;
this->flags = flags;
- this->text.Initialize(this->edit_str_buf, max_bytes, max_chars);
this->InitNested(desc, WN_QUERY_STRING);