1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2025-05-25 11:42:28 -04:00

ADS-B: Remove device set refresh button, as now automatic. Fix possible crash on close.

This commit is contained in:
Jon Beniston 2022-03-23 09:04:04 +00:00
parent 625104c181
commit 080a3f5ae3
2 changed files with 7 additions and 3 deletions

View File

@ -263,11 +263,15 @@ MapGUI::MapGUI(PluginAPI* pluginAPI, FeatureUISet *featureUISet, Feature *featur
displaySettings(); displaySettings();
applySettings(true); applySettings(true);
connect(&m_redrawMapTimer, &QTimer::timeout, this, &MapGUI::redrawMap);
m_redrawMapTimer.setSingleShot(true);
ui->map->installEventFilter(this); ui->map->installEventFilter(this);
} }
MapGUI::~MapGUI() MapGUI::~MapGUI()
{ {
disconnect(&m_redrawMapTimer, &QTimer::timeout, this, &MapGUI::redrawMap);
m_redrawMapTimer.stop();
//m_cesium->deleteLater(); //m_cesium->deleteLater();
delete m_cesium; delete m_cesium;
if (m_templateServer) if (m_templateServer)
@ -281,6 +285,7 @@ MapGUI::~MapGUI()
delete m_webServer; delete m_webServer;
} }
delete ui; delete ui;
ui = nullptr;
} }
// Update a map item or image // Update a map item or image
@ -707,9 +712,7 @@ void MapGUI::showEvent(QShowEvent *event)
{ {
// Workaround for https://bugreports.qt.io/browse/QTBUG-100333 // Workaround for https://bugreports.qt.io/browse/QTBUG-100333
// MapQuickItems can be in wrong position when window is first displayed // MapQuickItems can be in wrong position when window is first displayed
QTimer::singleShot(500, [this] { m_redrawMapTimer.start(500);
redrawMap();
});
} }
} }

View File

@ -110,6 +110,7 @@ private:
MapRadioTimeDialog m_radioTimeDialog; MapRadioTimeDialog m_radioTimeDialog;
quint16 m_osmPort; quint16 m_osmPort;
OSMTemplateServer *m_templateServer; OSMTemplateServer *m_templateServer;
QTimer m_redrawMapTimer;
CesiumInterface *m_cesium; CesiumInterface *m_cesium;
WebServer *m_webServer; WebServer *m_webServer;