diff options
author | peter1138 <peter1138@openttd.org> | 2008-07-29 10:26:48 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2008-07-29 10:26:48 +0000 |
commit | ca703d3701b82f6e6b218f12a74edaa73f91a6ab (patch) | |
tree | 3c8324c51a140090036a25616b3f2eb8eae4cd61 /src/signs.cpp | |
parent | b49814c537b4646c5994c0f52b6d7964081a8505 (diff) | |
download | openttd-ca703d3701b82f6e6b218f12a74edaa73f91a6ab.tar.xz |
(svn r13866) -Codechange: Use sortlist for sign windows
Diffstat (limited to 'src/signs.cpp')
-rw-r--r-- | src/signs.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/signs.cpp b/src/signs.cpp index 8c1ad123c..369295a60 100644 --- a/src/signs.cpp +++ b/src/signs.cpp @@ -24,7 +24,6 @@ #include "table/strings.h" SignID _new_sign_id; -bool _sign_sort_dirty; /* Initialize the sign-pool */ DEFINE_OLD_POOL_GENERIC(Sign, Sign) @@ -111,8 +110,7 @@ CommandCost CmdPlaceSign(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) si->z = GetSlopeZ(x, y); UpdateSignVirtCoords(si); MarkSignDirty(si); - InvalidateWindow(WC_SIGN_LIST, 0); - _sign_sort_dirty = true; + InvalidateWindowData(WC_SIGN_LIST, 0, 0); _new_sign_id = si->index; } @@ -148,8 +146,7 @@ CommandCost CmdRenameSign(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) MarkSignDirty(si); UpdateSignVirtCoords(si); MarkSignDirty(si); - InvalidateWindow(WC_SIGN_LIST, 0); - _sign_sort_dirty = true; + InvalidateWindowData(WC_SIGN_LIST, 0, 1); } } else { // Delete sign if (flags & DC_EXEC) { @@ -158,8 +155,7 @@ CommandCost CmdRenameSign(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) MarkSignDirty(si); delete si; - InvalidateWindow(WC_SIGN_LIST, 0); - _sign_sort_dirty = true; + InvalidateWindowData(WC_SIGN_LIST, 0, 1); } } @@ -242,8 +238,6 @@ static void Load_SIGN() Sign *si = new (index) Sign(); SlObject(si, _sign_desc); } - - _sign_sort_dirty = true; } extern const ChunkHandler _sign_chunk_handlers[] = { |