diff options
author | bjarni <bjarni@openttd.org> | 2006-12-06 00:03:24 +0000 |
---|---|---|
committer | bjarni <bjarni@openttd.org> | 2006-12-06 00:03:24 +0000 |
commit | eaa5af4f5cc57eb8189f38f11ed09ce7bf17fd74 (patch) | |
tree | 88a08c560da3d3fe244094048f25cbf6a2b99c7a | |
parent | 1f02a49721945405cb759f3b458a9b913461b2f8 (diff) | |
download | openttd-eaa5af4f5cc57eb8189f38f11ed09ce7bf17fd74.tar.xz |
(svn r7390) -Codechange r7386: only loop though the windows to find a depot window to unhighlight a vehicle in if there is a vehicle on the mouse pointer
-rw-r--r-- | depot_gui.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/depot_gui.c b/depot_gui.c index 7bb94e3e6..6ade0ece7 100644 --- a/depot_gui.c +++ b/depot_gui.c @@ -1041,6 +1041,10 @@ void DeleteDepotHighlightOfVehicle(const Vehicle *v) { Window* const *wz; + /* If we haven't got any vehicles on the mouse pointer, we haven't got any highlighted in any depots either + * If that is the case, we can skip looping though the windows and save time */ + if (_special_mouse_mode != WSM_DRAGDROP) return; + FOR_ALL_WINDOWS(wz) { const Window *w = *wz; if (w->window_class != WC_VEHICLE_DEPOT) continue; |