Commit db260738 authored by Volker Krause's avatar Volker Krause
Browse files

Fix station name comparison for unbound train tickets

This addresses the duplication seen in the screenshots in issue #29.
parent 8b6f5137
Pipeline #63900 passed with stages
in 9 minutes and 16 seconds
......@@ -318,7 +318,8 @@ static bool isSameTrainTrip(const TrainTrip &lhs, const TrainTrip &rhs)
// for unbound tickets, comparing the line number below wont help
// so we have to use the slightly less robust location comparisson
if (!lhs.departureTime().isValid() && !rhs.departureTime().isValid()) {
return lhs.departureStation().name() == rhs.departureStation().name() && lhs.arrivalStation().name() == rhs.departureStation().name();
qCDebug(CompareLog) << "unbound trip" << lhs.departureStation().name() << rhs.departureStation().name() << lhs.arrivalStation().name() << rhs.arrivalStation().name();
return lhs.departureStation().name() == rhs.departureStation().name() && lhs.arrivalStation().name() == rhs.arrivalStation().name();
}
if (lhs.trainNumber().isEmpty() || rhs.trainNumber().isEmpty()) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment