* Removes the highlight of a vehicle in a group window * @param *v Vehicle to remove all highlights from */
| 1305 | * @param *v Vehicle to remove all highlights from |
| 1306 | */ |
| 1307 | void DeleteGroupHighlightOfVehicle(const Vehicle *v) |
| 1308 | { |
| 1309 | /* If we haven't got any vehicles on the mouse pointer, we haven't got any highlighted in any group windows either |
| 1310 | * If that is the case, we can skip looping though the windows and save time |
| 1311 | */ |
| 1312 | if (_special_mouse_mode != WSM_DRAGDROP) return; |
| 1313 | |
| 1314 | VehicleGroupWindow *w = FindVehicleGroupWindow(v->type, v->owner); |
| 1315 | if (w != nullptr) w->UnselectVehicle(v->index); |
| 1316 | } |
no test coverage detected