Fixed jumping of band activity and call activity tables on update
This commit is contained in:
parent
9815c4dde9
commit
5fad5497d2
@ -1275,15 +1275,18 @@ void MainWindow::not_GA_warning_message ()
|
||||
"and carry a responsiblity to report any problems to:\n"
|
||||
"Jordan Sherer (KN4CRD) kn4crd@gmail.com\n\n").arg(QApplication::applicationName()).arg(eol.toString()));
|
||||
|
||||
|
||||
#if 0
|
||||
for(int i = 0; i < 13; i++){
|
||||
CallDetail cd;
|
||||
cd.call = "KN4CRD";
|
||||
cd.call = QString("KN%1CRD").arg(i);
|
||||
cd.freq = 1200;
|
||||
cd.bits = Varicode::FT8CallLast;
|
||||
cd.utcTimestamp = QDateTime::currentDateTimeUtc();
|
||||
logCallActivity(cd, false);
|
||||
m_rxDirty = true;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void MainWindow::initialize_fonts ()
|
||||
{
|
||||
@ -8965,12 +8968,18 @@ void MainWindow::displayBandActivity() {
|
||||
selectedOffset = selectedItems.first()->text().toInt();
|
||||
}
|
||||
|
||||
ui->tableWidgetRXAll->setUpdatesEnabled(false);
|
||||
{
|
||||
// Scroll Position
|
||||
auto currentScrollPos = ui->tableWidgetRXAll->verticalScrollBar()->value();
|
||||
|
||||
// Clear the table
|
||||
clearTableWidget(ui->tableWidgetRXAll);
|
||||
|
||||
// Sort directed & recent messages first
|
||||
QList < int > keys = m_bandActivity.keys();
|
||||
qSort(keys.begin(), keys.end(), [this](const int left, int right) {
|
||||
#if 0
|
||||
if (m_rxDirectedCache.contains(left / 10 * 10)) {
|
||||
return true;
|
||||
}
|
||||
@ -8983,6 +8992,7 @@ void MainWindow::displayBandActivity() {
|
||||
if (m_rxRecentCache.contains(right / 10 * 10)) {
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
return left < right;
|
||||
});
|
||||
|
||||
@ -9059,7 +9069,7 @@ void MainWindow::displayBandActivity() {
|
||||
textItem->setBackground(QBrush(m_config.color_CQ()));
|
||||
}
|
||||
|
||||
if (m_rxDirectedCache.contains(offset / 10 * 10)) {
|
||||
if (isDirectedOffset(offset)) {
|
||||
offsetItem->setBackground(QBrush(m_config.color_MyCall()));
|
||||
ageItem->setBackground(QBrush(m_config.color_MyCall()));
|
||||
snrItem->setBackground(QBrush(m_config.color_MyCall()));
|
||||
@ -9078,6 +9088,11 @@ void MainWindow::displayBandActivity() {
|
||||
ui->tableWidgetRXAll->resizeColumnToContents(0);
|
||||
ui->tableWidgetRXAll->resizeColumnToContents(1);
|
||||
ui->tableWidgetRXAll->resizeColumnToContents(2);
|
||||
|
||||
// Reset the scroll position
|
||||
ui->tableWidgetRXAll->verticalScrollBar()->setValue(currentScrollPos);
|
||||
}
|
||||
ui->tableWidgetRXAll->setUpdatesEnabled(true);
|
||||
}
|
||||
|
||||
void MainWindow::displayCallActivity() {
|
||||
@ -9086,6 +9101,10 @@ void MainWindow::displayCallActivity() {
|
||||
// Selected callsign
|
||||
QString selectedCall = callsignSelected();
|
||||
|
||||
ui->tableWidgetCalls->setUpdatesEnabled(false);
|
||||
{
|
||||
auto currentScrollPos = ui->tableWidgetCalls->verticalScrollBar()->value();
|
||||
|
||||
// Clear the table
|
||||
clearTableWidget(ui->tableWidgetCalls);
|
||||
|
||||
@ -9134,6 +9153,11 @@ void MainWindow::displayCallActivity() {
|
||||
ui->tableWidgetCalls->resizeColumnToContents(1);
|
||||
ui->tableWidgetCalls->resizeColumnToContents(2);
|
||||
ui->tableWidgetCalls->resizeColumnToContents(3);
|
||||
|
||||
// Reset the scroll position
|
||||
ui->tableWidgetCalls->verticalScrollBar()->setValue(currentScrollPos);
|
||||
}
|
||||
ui->tableWidgetCalls->setUpdatesEnabled(true);
|
||||
}
|
||||
|
||||
void MainWindow::postWSPRDecode (bool is_new, QStringList parts)
|
||||
|
Loading…
Reference in New Issue
Block a user