summaryrefslogtreecommitdiff
path: root/src/signs_gui.cpp
diff options
context:
space:
mode:
authorTyler Trahan <tyler@tylertrahan.com>2021-11-28 07:16:42 -0700
committerGitHub <noreply@github.com>2021-11-28 15:16:42 +0100
commit802ca4e72231895e9f043a7b380c59dfbba366cd (patch)
tree3f65113f1b513c0fda4d73e52d4ce1a7ba35d7e7 /src/signs_gui.cpp
parent6953df7b5e52d749e50275640197e5fc17e2310c (diff)
downloadopenttd-802ca4e72231895e9f043a7b380c59dfbba366cd.tar.xz
Fix: Don't try to rename OWNER_DEITY signs in-game (#9716)
Diffstat (limited to 'src/signs_gui.cpp')
-rw-r--r--src/signs_gui.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/signs_gui.cpp b/src/signs_gui.cpp
index 0240a6a25..516906462 100644
--- a/src/signs_gui.cpp
+++ b/src/signs_gui.cpp
@@ -565,10 +565,14 @@ static WindowDesc _query_sign_edit_desc(
*/
void HandleClickOnSign(const Sign *si)
{
+ /* If we can't rename the sign, don't even open the rename GUI. */
+ if (!CompanyCanRenameSign(si)) return;
+
if (_ctrl_pressed && (si->owner == _local_company || (si->owner == OWNER_DEITY && _game_mode == GM_EDITOR))) {
RenameSign(si->index, "");
return;
}
+
ShowRenameSignWindow(si);
}