From 3f177c10077ed492a9f7cf9252decdb9f546e1e8 Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Mon, 10 Oct 2022 11:26:41 +0100 Subject: [PATCH 1/2] Disable table sorting when adding a new row. Fixes #1472 --- plugins/channelrx/radioastronomy/radioastronomygui.cpp | 3 +++ plugins/feature/satellitetracker/satellitetrackergui.cpp | 2 ++ 2 files changed, 5 insertions(+) diff --git a/plugins/channelrx/radioastronomy/radioastronomygui.cpp b/plugins/channelrx/radioastronomy/radioastronomygui.cpp index 582c1714bf..331feff1b2 100644 --- a/plugins/channelrx/radioastronomy/radioastronomygui.cpp +++ b/plugins/channelrx/radioastronomy/radioastronomygui.cpp @@ -601,6 +601,7 @@ double RadioAstronomyGUI::beamFillingFactor() const void RadioAstronomyGUI::powerMeasurementReceived(FFTMeasurement *fft, bool skipCalcs) { + ui->powerTable->setSortingEnabled(false); int row = ui->powerTable->rowCount(); ui->powerTable->setRowCount(row + 1); @@ -660,6 +661,8 @@ void RadioAstronomyGUI::powerMeasurementReceived(FFTMeasurement *fft, bool skipC ui->powerTable->setItem(row, POWER_COL_SENSOR_1, sensor1Item); ui->powerTable->setItem(row, POWER_COL_SENSOR_2, sensor2Item); + ui->powerTable->setSortingEnabled(true); + QDateTime dateTime = fft->m_dateTime; dateItem->setData(Qt::DisplayRole, dateTime.date()); timeItem->setData(Qt::DisplayRole, dateTime.time()); diff --git a/plugins/feature/satellitetracker/satellitetrackergui.cpp b/plugins/feature/satellitetracker/satellitetrackergui.cpp index 80d236f849..a3d9e9f34d 100644 --- a/plugins/feature/satellitetracker/satellitetrackergui.cpp +++ b/plugins/feature/satellitetracker/satellitetrackergui.cpp @@ -1115,6 +1115,7 @@ void SatelliteTrackerGUI::updateTable(SatelliteState *satState) if (matches.size() == 0) { // Add a new row + ui->satTable->setSortingEnabled(false); int row = ui->satTable->rowCount(); ui->satTable->setRowCount(row + 1); for (int i = 0; i < SAT_COL_COLUMNS; i++) @@ -1128,6 +1129,7 @@ void SatelliteTrackerGUI::updateTable(SatelliteState *satState) items[i]->setToolTip(ui->satTable->horizontalHeaderItem(i)->toolTip()); ui->satTable->setItem(row, i, items[i]); } + ui->satTable->setSortingEnabled(true); // Static columns items[SAT_COL_NAME]->setText(satState->m_name); if (m_satellites.contains(satState->m_name)) From 451eb0e28da0e2c7c9c36725da99a20e5fe297b7 Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Mon, 10 Oct 2022 11:32:31 +0100 Subject: [PATCH 2/2] Sat tracker docs: Fix markup and add missing variables --- plugins/feature/satellitetracker/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/feature/satellitetracker/readme.md b/plugins/feature/satellitetracker/readme.md index ee5dca0241..413eca754b 100644 --- a/plugins/feature/satellitetracker/readme.md +++ b/plugins/feature/satellitetracker/readme.md @@ -99,7 +99,7 @@ On the Settings tab, you can set: * A command/script to be executed on LOS. This applies to all satellites. It is also possible to set a per-satellite command in the SDRangel Control dialog. * The Doppler correction period in seconds, which controls how frequently Doppler correction is applied. Which channels have Doppler correction applied is set on a per-channel basis in the SDRangel Control dialog. -For commands, scripts and speech, the following variables can be sustituted: ${aos}, ${los}, ${elevation}, ${aosAzimuth}, ${losAzimuth}, ${northToSouth}, ${latitude}, ${longitude}, ${altitude}, ${azimuth}, ${elevation}, ${range}, ${rangeRate}, ${speed} and ${period}. +For commands, scripts and speech, the following variables can be substituted: `${name}`, `${duration}`, `${aos}`, `${los}`, `${elevation}`, `${aosAzimuth}`, `${losAzimuth}`, `${northToSouth}`, `${latitude}`, `${longitude}`, `${altitude}`, `${azimuth}`, `${elevation}`, `${range}`, `${rangeRate}`, `${speed}` and `${period}`. ![Satellite tracker settings dialog](../../../doc/img/SatelliteTracker_plugin_settingsdialog2.png)