Changeset - r23512:89adada9c9f0
[Not reviewed]
master
0 1 0
PeterN - 5 years ago 2019-03-25 20:01:55
peter@fuzzle.org
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.
1 file changed with 1 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/signs_cmd.cpp
Show inline comments
 
@@ -58,6 +58,7 @@ CommandCost CmdPlaceSign(TileIndex tile,
 
		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;
0 comments (0 inline, 0 general)