[Marble-commits] KDE/kdeedu/marble/src/lib
Bernhard Beschow
bbeschow at cs.tu-berlin.de
Thu Nov 4 13:08:22 CET 2010
SVN commit 1193056 by beschow:
init VectorComposer in MarbleModel constructor rather than in MarbleMap constructor
* fix connection: connect datasetLoaded() to modelChanged() to ALL instances of MarbleModel rahter than only the first one
M +0 -2 MarbleMap.cpp
M +10 -13 MarbleModel.cpp
M +0 -5 MarbleModel.h
--- trunk/KDE/kdeedu/marble/src/lib/MarbleMap.cpp #1193055:1193056
@@ -227,7 +227,6 @@
d->m_modelIsOwned = true;
d->construct();
- d->m_model->setupVectorComposer();
qDebug("Model: Time elapsed: %d ms", t.elapsed());
}
@@ -241,7 +240,6 @@
d->m_modelIsOwned = false;
d->construct();
- d->m_model->setupVectorComposer();
}
MarbleMap::~MarbleMap()
--- trunk/KDE/kdeedu/marble/src/lib/MarbleModel.cpp #1193055:1193056
@@ -204,7 +204,17 @@
{
QTime t;
t.start();
+
MarbleModelPrivate::refCounter.ref();
+ if( MarbleModelPrivate::refCounter == 1 ) {
+ d->m_veccomposer = new VectorComposer();
+ d->m_texcolorizer = 0;
+ /* d->m_texcolorizer is not initialized here since it takes a long time
+ to create the palette and it might not even be used. Instead it's created
+ in setMapTheme if the theme being loaded does need it. If the theme
+ doesn't need it, it's left as is. */
+ }
+ connect( d->m_veccomposer, SIGNAL( datasetLoaded() ), SIGNAL( modelChanged() ) );
d->m_dataFacade = new MarbleDataFacade( this );
connect(d->m_dataFacade->treeModel(), SIGNAL( dataChanged(QModelIndex,QModelIndex) ),
@@ -613,19 +623,6 @@
this, SLOT( notifyModelChanged() ) );
}
-void MarbleModel::setupVectorComposer()
-{
- if( MarbleModelPrivate::refCounter == 1 ) {
- d->m_veccomposer = new VectorComposer();
- connect( d->m_veccomposer, SIGNAL( datasetLoaded() ), SIGNAL( modelChanged() ) );
- d->m_texcolorizer = 0;
- /* d->m_texcolorizer is not initialized here since it takes a long time
- to create the palette and it might not even be used. Instead it's created
- in setMapTheme if the theme being loaded does need it. If the theme
- doesn't need it, it's left as is. */
- }
-}
-
HttpDownloadManager* MarbleModel::downloadManager() const
{
return d->m_downloadManager;
--- trunk/KDE/kdeedu/marble/src/lib/MarbleModel.h #1193055:1193056
@@ -211,11 +211,6 @@
void setupTextureMapper( Projection projection );
/**
- * @brief Setup the Vector Composer
- */
- void setupVectorComposer();
-
- /**
* @brief Return the downloadmanager to load missing tiles
* @return the HttpDownloadManager instance.
*/
More information about the Marble-commits
mailing list