summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2011-12-09 08:10:15 +0000
committerpeter1138 <peter1138@openttd.org>2011-12-09 08:10:15 +0000
commit01745c8226e3cdd9ff56f9c89a246fbcdc5fc5bf (patch)
tree3e40bdc048e524af1d8653d245a28293df915f1c
parentb5d707b7a0be1e3582932dde20d56ecb76e84bc5 (diff)
downloadopenttd-01745c8226e3cdd9ff56f9c89a246fbcdc5fc5bf.tar.xz
(svn r23454) -Change: Mark company window dirty when moving a rail engine creates or deletes a train.
-rw-r--r--src/train_cmd.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp
index e48220938..440ff9bdb 100644
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -1254,6 +1254,7 @@ CommandCost CmdMoveRailVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, u
DeleteWindowById(WC_VEHICLE_REFIT, src->index);
DeleteWindowById(WC_VEHICLE_DETAILS, src->index);
DeleteWindowById(WC_VEHICLE_TIMETABLE, src->index);
+ SetWindowDirty(WC_COMPANY, _current_company);
/* Delete orders, group stuff and the unit number as we're not the
* front of any vehicle anymore. */
@@ -1266,6 +1267,7 @@ CommandCost CmdMoveRailVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, u
* we should be put in the default group. */
if (original_src_head != src && dst_head == src) {
SetTrainGroupID(src, DEFAULT_GROUP);
+ SetWindowDirty(WC_COMPANY, _current_company);
}
/* Add new heads to statistics */