[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [marble] src/plugins/render/satellites: First half-done approach to Satellites settings mess
From: Friedrich W. H. Kossebau <kossebau () kde ! org>
Date: 2016-07-31 16:43:26
Message-ID: E1bTtpm-0006WX-D7 () code ! kde ! org
[Download RAW message or body]
Git commit 61816f122208315d208cd1d02930d39c0c830603 by Friedrich W. H. Kossebau.
Committed on 31/07/2016 at 16:36.
Pushed by kossebau into branch 'master'.
First half-done approach to Satellites settings mess
M +6 -10 src/plugins/render/satellites/SatellitesPlugin.cpp
http://commits.kde.org/marble/61816f122208315d208cd1d02930d39c0c830603
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();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic