kopia lustrzana https://github.com/f4exb/sdrangel
Remove satellites from map on close
rodzic
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++)
|
||||
|
|
Ładowanie…
Reference in New Issue