From bef0b8184ea273c168e8a7165d2435764af3617f Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Sat, 1 Aug 2026 19:16:31 -0400 Subject: [PATCH] vorlocalizer: Fix round robin plan sorting comparator The channel count comparison in getChannelsByDevice() accidentally used the first plan's channel count for both operands. This caused the comparator to always treat the channel counts as equal and sort only by bandwidth. Use the second plan's channel count when comparing RRTurnPlans so plans are ordered correctly by number of channels before applying the bandwidth tie-breaker. Signed-off-by: Robin Getz --- plugins/feature/vorlocalizer/vorlocalizerworker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/feature/vorlocalizer/vorlocalizerworker.cpp b/plugins/feature/vorlocalizer/vorlocalizerworker.cpp index f2deb09a3..e12cf071b 100644 --- a/plugins/feature/vorlocalizer/vorlocalizerworker.cpp +++ b/plugins/feature/vorlocalizer/vorlocalizerworker.cpp @@ -652,7 +652,7 @@ void VorLocalizerWorker::getChannelsByDevice( bool operator()(const RRTurnPlan& a, const RRTurnPlan& b) { unsigned int nbChannelsA = a.m_channels.size(); - unsigned int nbChannelsB = a.m_channels.size(); + unsigned int nbChannelsB = b.m_channels.size(); if (nbChannelsA == nbChannelsB) { return a.m_bandwidth > b.m_bandwidth;