[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdeedu/marble/src/plugins/marble
From:       Torsten Rahn <tackat () kde ! org>
Date:       2008-11-19 8:16:25
Message-ID: 1227082585.201464.18626.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 886415 by rahn:

- Switching off the starry sky for the moon as it's not correct
- Updating the map scale on target change ...



 M  +5 -1      mapscale/MapScaleFloatItem.cpp  
 M  +2 -0      mapscale/MapScaleFloatItem.h  
 M  +7 -0      stars/MarbleStarsPlugin.cpp  


--- trunk/KDE/kdeedu/marble/src/plugins/marble/mapscale/MapScaleFloatItem.cpp #886414:886415
@@ -26,6 +26,7 @@
 MapScaleFloatItem::MapScaleFloatItem( const QPointF &point, const QSizeF &size )
     : MarbleAbstractFloatItem( point, size ),
       m_radius(0),
+      m_target(QString()),
       m_invScale(0.0),
       m_leftBarMargin(0),
       m_rightBarMargin(0),
@@ -88,7 +89,10 @@
 {
     int viewportWidth = viewport->width();
 
-    if ( m_radius == viewport->radius() && viewportWidth == m_viewportWidth && m_scaleInitDone )
+    QString target = dataFacade()->target();
+
+    if (    m_radius == viewport->radius() && viewportWidth == m_viewportWidth 
+         && m_target == target && m_scaleInitDone )
     {
         return false;
     }
--- trunk/KDE/kdeedu/marble/src/plugins/marble/mapscale/MapScaleFloatItem.h #886414:886415
@@ -61,6 +61,8 @@
     int      m_radius;
     int      m_invScale;
 
+    QString  m_target;
+
     int      m_leftBarMargin;
     int      m_rightBarMargin;
     int      m_scaleBarWidth;
--- trunk/KDE/kdeedu/marble/src/plugins/marble/stars/MarbleStarsPlugin.cpp #886414:886415
@@ -111,6 +111,13 @@
 				const QString& renderPos,
 				GeoSceneLayer * layer )
 {
+    QString target = dataFacade()->target();
+
+    // So far this starry sky plugin only supports displaying stars on earth.
+    if ( target != "earth" ) {
+        return true;
+    }
+
     painter->autoMapQuality();
 
     QPen starPen( Qt::NoPen );
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic