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/waypoint_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/waypoint_gui.cpp')
-rw-r--r-- | src/waypoint_gui.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/waypoint_gui.cpp b/src/waypoint_gui.cpp index 11864feb3..995a1630e 100644 --- a/src/waypoint_gui.cpp +++ b/src/waypoint_gui.cpp @@ -74,7 +74,7 @@ public: case WAYPVW_RENAME: /* rename */ SetDParam(0, this->wp->index); - ShowQueryString(STR_WAYPOINT_RAW, STR_EDIT_WAYPOINT_NAME, MAX_LENGTH_WAYPOINT_NAME_BYTES, MAX_LENGTH_WAYPOINT_NAME_PIXELS, this, CS_ALPHANUMERAL, QSF_NONE); + ShowQueryString(STR_WAYPOINT_RAW, STR_EDIT_WAYPOINT_NAME, MAX_LENGTH_WAYPOINT_NAME_BYTES, MAX_LENGTH_WAYPOINT_NAME_PIXELS, this, CS_ALPHANUMERAL, QSF_ENABLE_DEFAULT); break; case WAYPVW_SHOW_TRAINS: /* show list of trains having this waypoint in their orders*/ @@ -92,10 +92,10 @@ public: virtual void OnQueryTextFinished(char *str) { - if (!StrEmpty(str)) { - _cmd_text = str; - DoCommandP(0, this->window_number, 0, NULL, CMD_RENAME_WAYPOINT | CMD_MSG(STR_CANT_CHANGE_WAYPOINT_NAME)); - } + if (str == NULL) return; + + _cmd_text = str; + DoCommandP(0, this->window_number, 0, NULL, CMD_RENAME_WAYPOINT | CMD_MSG(STR_CANT_CHANGE_WAYPOINT_NAME)); } }; |