[PATCH] Center On Earth When Startup

Hugle wulong at comp.nus.edu.sg
Wed Mar 26 02:59:50 PDT 2014


This patch remove the unused variable 'marble' at 'global.cpp'.

At the same time, it makes the marble widget center on the whole earth
instead of display blur earth area when starting the application.

Signed-off-by: Hugle <wulong at comp.nus.edu.sg>
---
 qt-ui/globe.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qt-ui/globe.cpp b/qt-ui/globe.cpp
index 4c67437..6780c70 100644
--- a/qt-ui/globe.cpp
+++ b/qt-ui/globe.cpp
@@ -36,7 +36,6 @@ GlobeGPS::GlobeGPS(QWidget *parent) : MarbleWidget(parent),
 	MapThemeManager mtm;
 	QStringList list = mtm.mapThemeIds();
 	QString subsurfaceDataPath;
-	QDir marble;
 	if (!list.contains("earth/googlesat/googlesat.dgml")) {
 		subsurfaceDataPath = getSubsurfaceDataPath("marbledata");
 		if (subsurfaceDataPath != "") {
@@ -67,6 +66,7 @@ GlobeGPS::GlobeGPS(QWidget *parent) : MarbleWidget(parent),
 	setShowOverviewMap(false);
 	setShowScaleBar(true);
 	setShowCompass(false);
+	centerOn(GeoDataLatLonBox(90, -90, 90, -90), false);
 	connect(this, SIGNAL(mouseClickGeoPosition(qreal, qreal, GeoDataCoordinates::Unit)),
 		this, SLOT(mouseClicked(qreal, qreal, GeoDataCoordinates::Unit)));
 
-- 
1.9.0



More information about the subsurface mailing list