summaryrefslogtreecommitdiff
path: root/src/signs_gui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/signs_gui.cpp')
-rw-r--r--src/signs_gui.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/signs_gui.cpp b/src/signs_gui.cpp
index a7af05dbf..09739e6f5 100644
--- a/src/signs_gui.cpp
+++ b/src/signs_gui.cpp
@@ -159,8 +159,6 @@ struct SignListWindow : QueryStringBaseWindow, SignList {
this->ok_button = WID_SIL_FILTER_ENTER_BTN;
this->cancel_button = WID_SIL_FILTER_CLEAR_BTN;
this->afilter = CS_ALPHANUMERAL;
- this->text.Initialize(this->edit_str_buf, MAX_LENGTH_SIGN_NAME_CHARS * MAX_CHAR_LENGTH, MAX_LENGTH_SIGN_NAME_CHARS);
- ClearFilterTextWidget();
/* Initialize the filtering variables */
this->SetFilterString("");
@@ -450,19 +448,15 @@ struct SignWindow : QueryStringBaseWindow, SignList {
void UpdateSignEditWindow(const Sign *si)
{
- char *last_of = &this->edit_str_buf[this->edit_str_size - 1]; // points to terminating '\0'
-
/* Display an empty string when the sign hasnt been edited yet */
if (si->name != NULL) {
SetDParam(0, si->index);
- GetString(this->edit_str_buf, STR_SIGN_NAME, last_of);
+ this->text.Assign(STR_SIGN_NAME);
} else {
- GetString(this->edit_str_buf, STR_EMPTY, last_of);
+ this->text.DeleteAll();
}
- *last_of = '\0';
this->cur_sign = si->index;
- this->text.Initialize(this->edit_str_buf, this->edit_str_size, this->max_chars);
this->SetWidgetDirty(WID_QES_TEXT);
this->SetFocusedWidget(WID_QES_TEXT);