summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFriedrich W. H. Kossebau <kossebau@kde.org>2016-07-27 11:46:33 (GMT)
committerFriedrich W. H. Kossebau <kossebau@kde.org>2016-07-27 11:46:33 (GMT)
commit5db42c6455fc9bfaf32242dc897ee654f906c030 (patch)
treede82d7e9b2d2be5daed6bbc05830979ae660a4a9
parentaf52863dea16e9255d0173e024847b59f7309f4b (diff)
Satellites: Do not trigger default setting in constructor to avoid bad data
-rw-r--r--src/plugins/render/satellites/SatellitesPlugin.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/plugins/render/satellites/SatellitesPlugin.cpp b/src/plugins/render/satellites/SatellitesPlugin.cpp
index 7bd3eb3..5380259 100644
--- a/src/plugins/render/satellites/SatellitesPlugin.cpp
+++ b/src/plugins/render/satellites/SatellitesPlugin.cpp
@@ -46,7 +46,16 @@ SatellitesPlugin::SatellitesPlugin( const MarbleModel *marbleModel )
m_configDialog, SLOT(setDialogActive(bool)) );
setVisible( false );
- setSettings( QHash<QString, QVariant>() );
+ // 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.
m_showOrbitAction = new QAction( tr( "Display orbit" ), this );
m_showOrbitAction->setCheckable( true );