diff options
author | frosch <frosch@openttd.org> | 2009-01-08 21:16:19 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2009-01-08 21:16:19 +0000 |
commit | b522f73ba8f6c53f75639fc4f5d6b2a078827513 (patch) | |
tree | 4254262254ea6b50d5e2e525886c9761cf77d415 /src/vehicle.cpp | |
parent | 17a9bab1422401e3d7f2c29ed50054ff3bcf3b24 (diff) | |
download | openttd-b522f73ba8f6c53f75639fc4f5d6b2a078827513.tar.xz |
(svn r14925) -Fix [FS#2500]: Abort dragging of vehicles in the group window when they are deleted.
Diffstat (limited to 'src/vehicle.cpp')
-rw-r--r-- | src/vehicle.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp index e88854bcc..b88a1f3b7 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -32,6 +32,7 @@ #include "newgrf_station.h" #include "newgrf_text.h" #include "group.h" +#include "group_gui.h" #include "order_func.h" #include "strings_func.h" #include "zoom_func.h" @@ -571,6 +572,7 @@ void Vehicle::PreDestructor() GetCompany(this->owner)->num_engines[this->engine_type]--; if (this->owner == _local_company) InvalidateAutoreplaceWindow(this->engine_type, this->group_id); + DeleteGroupHighlightOfVehicle(this); if (IsValidGroupID(this->group_id)) GetGroup(this->group_id)->num_engines[this->engine_type]--; if (this->IsPrimaryVehicle()) DecreaseGroupNumVehicle(this->group_id); } |