From 1266b1a73f4197e3bf4d2cc0e09e9e667d7c640e Mon Sep 17 00:00:00 2001 From: smatz Date: Mon, 15 Sep 2008 19:02:50 +0000 Subject: (svn r14334) -Feature: ability to reset name to default/automatic value (for vehicles, engines, towns, groups, stations, waypoints, managers and companies) --- src/station_gui.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/station_gui.cpp') diff --git a/src/station_gui.cpp b/src/station_gui.cpp index a01cf2661..091cd6884 100644 --- a/src/station_gui.cpp +++ b/src/station_gui.cpp @@ -912,7 +912,7 @@ struct StationViewWindow : public Window { case SVW_RENAME: SetDParam(0, this->window_number); - ShowQueryString(STR_STATION, STR_3030_RENAME_STATION_LOADING, MAX_LENGTH_STATION_NAME_BYTES, MAX_LENGTH_STATION_NAME_PIXELS, this, CS_ALPHANUMERAL, QSF_NONE); + ShowQueryString(STR_STATION, STR_3030_RENAME_STATION_LOADING, MAX_LENGTH_STATION_NAME_BYTES, MAX_LENGTH_STATION_NAME_PIXELS, this, CS_ALPHANUMERAL, QSF_ENABLE_DEFAULT); break; case SVW_TRAINS: { // Show a list of scheduled trains to this station @@ -947,11 +947,10 @@ struct StationViewWindow : public Window { virtual void OnQueryTextFinished(char *str) { - if (!StrEmpty(str)) { - _cmd_text = str; - DoCommandP(0, this->window_number, 0, NULL, - CMD_RENAME_STATION | CMD_MSG(STR_3031_CAN_T_RENAME_STATION)); - } + if (str == NULL) return; + + _cmd_text = str; + DoCommandP(0, this->window_number, 0, NULL, CMD_RENAME_STATION | CMD_MSG(STR_3031_CAN_T_RENAME_STATION)); } virtual void OnResize(Point new_size, Point delta) -- cgit v1.2.3-54-g00ecf