1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-23 01:55:48 -05:00

Remove satellites from map on close

This commit is contained in:
Jon Beniston 2023-02-16 14:33:39 +00:00
parent 9fb1171336
commit 4fa132731b

View File

@ -68,6 +68,16 @@ SatelliteTrackerWorker::~SatelliteTrackerWorker()
qDebug() << "SatelliteTrackerWorker::~SatelliteTrackerWorker";
stopWork();
m_inputMessageQueue.clear();
// Remove satellites from Map
QHashIterator<QString, SatWorkerState *> itr(m_workerState);
while (itr.hasNext())
{
itr.next();
if (m_settings.m_drawOnMap) {
removeFromMap(itr.key());
}
}
qDeleteAll(m_workerState);
}
void SatelliteTrackerWorker::startWork()
@ -187,7 +197,13 @@ void SatelliteTrackerWorker::applySettings(const SatelliteTrackerSettings& setti
{
itr.next();
if (settings.m_satellites.indexOf(itr.key()) == -1)
{
if (m_settings.m_drawOnMap) {
removeFromMap(itr.key());
}
delete itr.value();
itr.remove();
}
}
// Add new satellites