mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 06:35:52 +08:00
Ref T632, use rendered and callsign as tie breaker if distance is equal in snapshot
This commit is contained in:
@@ -266,5 +266,15 @@ namespace BlackMisc
|
||||
}
|
||||
return c;
|
||||
}
|
||||
|
||||
void CSimulatedAircraftList::sortByDistanceToReferencePositionRenderedCallsign()
|
||||
{
|
||||
this->sort([ & ](const CSimulatedAircraft & a, const CSimulatedAircraft & b)
|
||||
{
|
||||
if (a.getRelativeDistance() != b.getRelativeDistance()) { return a.getRelativeDistance() < b.getRelativeDistance(); }
|
||||
if (a.isRendered() != b.isRendered()) { return a.isRendered(); } // get the rendered first
|
||||
return a.getCallsignAsString() < b.getCallsignAsString();
|
||||
});
|
||||
}
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user