summaryrefslogtreecommitdiff
path: root/src/group_gui.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2011-03-08 20:52:59 +0000
committerfrosch <frosch@openttd.org>2011-03-08 20:52:59 +0000
commit77d1dcb92633b2bd8ce9c878f75b1e9363324983 (patch)
tree5ebc7be52bfc90174a44de3cf7879b386b3cc6c1 /src/group_gui.cpp
parentb997ebb94292972f445bd11678ae7768618e0299 (diff)
downloadopenttd-77d1dcb92633b2bd8ce9c878f75b1e9363324983.tar.xz
(svn r22228) -Fix (r22135)[FS#4546]: Do not resort town, industry and signs list directly in OnInvalidateData(). There might be a scheduled rebuild which needs execution first. So, only set a trigger for resorting.
Diffstat (limited to 'src/group_gui.cpp')
-rw-r--r--src/group_gui.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/group_gui.cpp b/src/group_gui.cpp
index 1c1453bcf..6f23af3fb 100644
--- a/src/group_gui.cpp
+++ b/src/group_gui.cpp
@@ -255,6 +255,9 @@ public:
virtual void OnInvalidateData(int data)
{
+ /* We can only set the trigger for resorting/rebuilding.
+ * We cannot safely resort at this point, as there might be multiple scheduled invalidations,
+ * and a rebuild needs to be done first though it is scheduled later. */
if (data == 0) {
this->vehicles.ForceRebuild();
this->groups.ForceRebuild();