[Marble-commits] branches/KDE/4.6/kdeedu/marble/src

Dennis Nienhüser earthwings at gentoo.org
Thu Dec 23 16:40:09 CET 2010


SVN commit 1208874 by nienhueser:

Make Mercator the default projection on Maemo.
Backport of commit 1208607.

 M  +3 -1      QtMainWindow.cpp  
 M  +1 -1      lib/ViewportParams.cpp  


--- branches/KDE/4.6/kdeedu/marble/src/QtMainWindow.cpp #1208873:1208874
@@ -906,8 +906,10 @@
          QString mapThemeId = settings.value("mapTheme", m_controlView->defaultMapThemeId() ).toString();
          qDebug() << "ReadSettings: mapThemeId: " << mapThemeId;
          m_controlView->marbleWidget()->setMapThemeId( mapThemeId );
+         bool const smallScreen = MarbleGlobal::getInstance()->profiles() & MarbleGlobal::SmallScreen;
+         int const defaultProjection = smallScreen ? Mercator : Spherical;
          m_controlView->marbleWidget()->setProjection(
-            (Projection)(settings.value("projection", 0 ).toInt())
+            (Projection)(settings.value("projection", defaultProjection ).toInt())
          );
 
          // Last location on quit
--- branches/KDE/4.6/kdeedu/marble/src/lib/ViewportParams.cpp #1208873:1208874
@@ -61,7 +61,7 @@
 };
 
 ViewportParamsPrivate::ViewportParamsPrivate()
-    : m_projection( Spherical ),                    // Default projection
+    : m_projection( MarbleGlobal::getInstance()->profiles() & MarbleGlobal::SmallScreen ? Mercator : Spherical ), // Default projection
       m_currentProjection( &s_sphericalProjection ),
       m_planetAxis(),
       m_planetAxisMatrix(),


More information about the Marble-commits mailing list