From fa0baad9a02f17ade358c5a39c556183675dbacf Mon Sep 17 00:00:00 2001 From: Jordan Sherer Date: Fri, 6 Jul 2018 22:21:04 -0400 Subject: [PATCH] Pin calling activity to the top of the activity window --- mainwindow.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index 3c812f5..d30b2ab 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -7544,7 +7544,17 @@ void MainWindow::postDecode (bool is_new, QString const& message) auto now = QDateTime::currentDateTimeUtc(); clearTableWidget(ui->tableWidgetRXAll); QList keys = m_bandActivity.keys(); - qSort(keys.begin(), keys.end()); + + qSort(keys.begin(), keys.end(), [this](const int left, int right){ + if(m_rxDirectedCache.contains(left/10*10)){ + return true; + } + if(m_rxDirectedCache.contains(right/10*10)){ + return false; + } + return left < right; + }); + foreach (int offset, keys) { QList items = m_bandActivity[offset]; if(items.length() > 0){