mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-12-23 10:05:46 -05:00
Remove satellites from map on close
This commit is contained in:
parent
9fb1171336
commit
4fa132731b
@ -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,8 +197,14 @@ 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
|
||||
for (int i = 0; i < settings.m_satellites.size(); i++)
|
||||
|
Loading…
Reference in New Issue
Block a user