summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFriedrich W. H. Kossebau <kossebau@kde.org>2016-07-31 16:36:48 (GMT)
committerFriedrich W. H. Kossebau <kossebau@kde.org>2016-07-31 16:36:48 (GMT)
commit61816f122208315d208cd1d02930d39c0c830603 (patch)
tree299bb6961124cfc4cb9ebf5c8b7895a155b64d88
parent513c946f2a61fabe4e57ef6ce5c836fed1511ad9 (diff)
First half-done approach to Satellites settings mess
-rw-r--r--src/plugins/render/satellites/SatellitesPlugin.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/plugins/render/satellites/SatellitesPlugin.cpp b/src/plugins/render/satellites/SatellitesPlugin.cpp
index 5380259..64c7fea 100644
--- a/src/plugins/render/satellites/SatellitesPlugin.cpp
+++ b/src/plugins/render/satellites/SatellitesPlugin.cpp
@@ -46,16 +46,7 @@ SatellitesPlugin::SatellitesPlugin( const MarbleModel *marbleModel )
m_configDialog, SLOT(setDialogActive(bool)) );
setVisible( false );
- // TODO: due to the async fetching of data sources there is some race condition
- // on multiple calls of this method, this needs some closer look
- // The plugin used to call here
- // setSettings( QHash<QString, QVariant>() );
- // to set some defaults. But this resulted in idList being garbaged with more and more
- // duplicated entries of MSC at each app start, as the default setting would trigger
- // some addition of ids later on, when in the meantime the setSettings() call from
- // the plugin user on startup would set idList with the ids stored from last run.
- // For now we just rely on the plugin user calling setSettings and have the default
- // set then if needed.
+ setSettings(QHash<QString, QVariant>());
m_showOrbitAction = new QAction( tr( "Display orbit" ), this );
m_showOrbitAction->setCheckable( true );
@@ -283,6 +274,10 @@ void SatellitesPlugin::setSettings( const QHash<QString, QVariant> &settings )
{
RenderPlugin::setSettings( settings );
+ // reset
+ m_newDataSources.clear();
+ // TODO: cancel also all on-going downloads
+
// add default data sources
if( !settings.contains( "dataSources" ) ) {
QStringList dsList;
@@ -346,6 +341,7 @@ void SatellitesPlugin::updateSettings()
return;
}
+ // TODO: cancel also all on-going downloads
m_satModel->clear();
m_configModel->clear();