From 698241e16e12bdb03cdc90bdf3d5a6ff631ae309 Mon Sep 17 00:00:00 2001 From: PeterN Date: Mon, 25 Mar 2019 20:01:55 +0000 Subject: [PATCH] Fix #7410: Sign position/width not set on initial creation. (#7413) Sign width was only updated when the text was changed. This seems to work for player-placed signs as there is always a rename operation, however AIs can create a sign with text in one go, in which case the width was never set. --- src/signs_cmd.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/signs_cmd.cpp b/src/signs_cmd.cpp index 69fde2559f..e094e9e0ff 100644 --- a/src/signs_cmd.cpp +++ b/src/signs_cmd.cpp @@ -58,6 +58,7 @@ CommandCost CmdPlaceSign(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 if (!StrEmpty(text)) { si->name = stredup(text); } + si->UpdateVirtCoord(); _viewport_sign_kdtree.Insert(ViewportSignKdtreeItem::MakeSign(si->index)); InvalidateWindowData(WC_SIGN_LIST, 0, 0); _new_sign_id = si->index;