Departures: Don't include via departures in smart terminus detection

This commit is contained in:
Jonathan G Rennison 2024-09-08 13:08:32 +01:00
parent c9ad1aec51
commit 85668549a3

View File

@ -839,9 +839,10 @@ static DepartureList MakeDepartureListLiveMode(DepartureOrderDestinationDetector
if (!duplicate) {
result.push_back(std::move(departure_ptr));
if (_settings_client.gui.departure_smart_terminus && type == D_DEPARTURE) {
for (uint i = 0; i < result.size() - 1; ++i) {
if (_settings_client.gui.departure_smart_terminus && type == D_DEPARTURE && !d->show_as_via) {
for (uint i = 0; i < (uint)(result.size() - 1); ++i) {
Departure *d_first = result[i].get();
if (d_first->show_as_via) continue;
uint k = (uint)d_first->calling_at.size() - 2;
uint j = (uint)d->calling_at.size();
while (j > 0) {