[Marble-commits] branches/KDE/4.4/kdeedu/marble/src/lib
Dennis Nienhüser
earthwings at gentoo.org
Wed Jan 27 21:28:21 CET 2010
SVN commit 1081137 by nienhueser:
OSM Namefinder so far only works on earth. Disable it for other planets. Backport of commit 1075583.
BUG: 181865
M +1 -0 MarbleControlBox.cpp
M +13 -6 MarbleRunnerManager.cpp
M +3 -0 MarbleRunnerManager.h
--- branches/KDE/4.4/kdeedu/marble/src/lib/MarbleControlBox.cpp #1081136:1081137
@@ -575,6 +575,7 @@
}
QString selectedId = d->m_widget->mapTheme()->head()->target();
+ d->m_runnerManager->setCelestialBodyId( selectedId );
QList<QStandardItem*> itemList = d->m_celestialList->findItems( selectedId, Qt::MatchExactly, 1 );
--- branches/KDE/4.4/kdeedu/marble/src/lib/MarbleRunnerManager.cpp #1081136:1081137
@@ -77,14 +77,16 @@
this, SLOT( slotRunnerFinished( MarbleAbstractRunner*, QVector<GeoDataPlacemark> ) ));
llrunner->parse(text);
- OnfRunner* onfrunner = new OnfRunner;
- m_runners << dynamic_cast<MarbleAbstractRunner*>(onfrunner);
- connect( onfrunner, SIGNAL( runnerFinished( MarbleAbstractRunner*, QVector<GeoDataPlacemark> ) ),
- this, SLOT( slotRunnerFinished( MarbleAbstractRunner*, QVector<GeoDataPlacemark> ) ));
- onfrunner->parse(text);
+ if (m_celestialBodyId == "earth") {
+ OnfRunner* onfrunner = new OnfRunner;
+ m_runners << dynamic_cast<MarbleAbstractRunner*>(onfrunner);
+ connect( onfrunner, SIGNAL( runnerFinished( MarbleAbstractRunner*, QVector<GeoDataPlacemark> ) ),
+ this, SLOT( slotRunnerFinished( MarbleAbstractRunner*, QVector<GeoDataPlacemark> ) ));
+ onfrunner->parse(text);
+ onfrunner->start();
+ }
llrunner->start();
- onfrunner->start();
}
void MarbleRunnerManager::slotRunnerFinished( MarbleAbstractRunner* runner, QVector<GeoDataPlacemark> result )
@@ -104,6 +106,11 @@
emit modelChanged( m_model );
}
+void MarbleRunnerManager::setCelestialBodyId(const QString &celestialBodyId)
+{
+ m_celestialBodyId = celestialBodyId;
}
+}
+
#include "MarbleRunnerManager.moc"
--- branches/KDE/4.4/kdeedu/marble/src/lib/MarbleRunnerManager.h #1081136:1081137
@@ -41,6 +41,8 @@
explicit MarbleRunnerManager( QObject *parent = 0 );
~MarbleRunnerManager();
+ void setCelestialBodyId(const QString &celestialBodyId);
+
public slots:
void newText(QString text);
signals:
@@ -56,6 +58,7 @@
QList<MarbleAbstractRunner*> m_runners;
QVector<GeoDataPlacemark> m_placemarkContainer;
QMutex m_modelMutex;
+ QString m_celestialBodyId;
};
}
More information about the Marble-commits
mailing list