summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2015-07-26 09:56:43 +0000
committerfrosch <frosch@openttd.org>2015-07-26 09:56:43 +0000
commita81968d0f35a58c04a445a35a02f1ce06837d5dd (patch)
tree7fd78806f3c27df95b97f567e24726fc1c277b95 /src
parent4830497f0bd448e8ce236ec6e7b5618b74e85ff7 (diff)
downloadopenttd-a81968d0f35a58c04a445a35a02f1ce06837d5dd.tar.xz
(svn r27341) -Fix [FS#6332]: Do not rerandomise the town name when only cost-estimating the founding.
Diffstat (limited to 'src')
-rw-r--r--src/town_gui.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/town_gui.cpp b/src/town_gui.cpp
index 6ae37d71a..222549ff7 100644
--- a/src/town_gui.cpp
+++ b/src/town_gui.cpp
@@ -1113,7 +1113,8 @@ public:
bool success = DoCommandP(tile, this->town_size | this->city << 2 | this->town_layout << 3 | random << 6,
townnameparts, CMD_FOUND_TOWN | CMD_MSG(errstr), cc, name);
- if (success) this->RandomTownName();
+ /* Rerandomise name, if success and no cost-estimation. */
+ if (success && !_shift_pressed) this->RandomTownName();
}
virtual void OnClick(Point pt, int widget, int click_count)