diff options
author | smatz <smatz@openttd.org> | 2008-09-15 19:02:50 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2008-09-15 19:02:50 +0000 |
commit | 1266b1a73f4197e3bf4d2cc0e09e9e667d7c640e (patch) | |
tree | 9ea3e279046e9a622321db881df0c37605fde380 /src/station_gui.cpp | |
parent | 42f33890aa4612a821c20783778bb086ee2028b6 (diff) | |
download | openttd-1266b1a73f4197e3bf4d2cc0e09e9e667d7c640e.tar.xz |
(svn r14334) -Feature: ability to reset name to default/automatic value (for vehicles, engines, towns, groups, stations, waypoints, managers and companies)
Diffstat (limited to 'src/station_gui.cpp')
-rw-r--r-- | src/station_gui.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
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) |