From 09124e2186edb9c07ee5d5ecbc50e4ce0ebaafda Mon Sep 17 00:00:00 2001 From: rubidium Date: Sun, 27 Sep 2009 10:44:25 +0000 Subject: [PATCH] (svn r17654) -Fix [FS#3220] (r17612): the edit box of the town fund window wasn't updated properly (based on patch of Terkhen) --- src/town_gui.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/town_gui.cpp b/src/town_gui.cpp index 4a001f1dcf..398bf628aa 100644 --- a/src/town_gui.cpp +++ b/src/town_gui.cpp @@ -969,6 +969,7 @@ public: params(_settings_game.game_creation.town_name) { this->InitNested(desc, window_number); + InitializeTextBuffer(&this->text, this->edit_str_buf, this->edit_str_size, MAX_LENGTH_TOWN_NAME_PIXELS); this->RandomTownName(); this->UpdateButtons(); } @@ -982,9 +983,10 @@ public: } else { GetTownName(this->edit_str_buf, &this->params, this->townnameparts, &this->edit_str_buf[this->edit_str_size - 1]); } - InitializeTextBuffer(&this->text, this->edit_str_buf, this->edit_str_size, MAX_LENGTH_TOWN_NAME_PIXELS); + UpdateTextBufferSize(&this->text); this->SetFocusedWidget(TSEW_TOWNNAME_EDITBOX); + this->SetWidgetDirty(TSEW_TOWNNAME_EDITBOX); } void UpdateButtons()