[Kstars-devel] KDE/kdeedu/kstars/kstars/skycomponents

Akarsh Simha akarshsimha at gmail.com
Tue May 18 20:25:42 CEST 2010


SVN commit 1128228 by asimha:

Changes in the drawing of deep-sky object labels:

+ Labels are drawn only if the corresponding objects are drawn.

+ The label magnitude limit slider actually works (but needs more
  tweaking)

+ This also seems to have fixed the problem of multiple copies of
  labels being drawn immediately after slewing.

CCMAIL: kstars-devel at kde.org



 M  +4 -3      deepskycomponent.cpp  


--- trunk/KDE/kdeedu/kstars/kstars/skycomponents/deepskycomponent.cpp #1128227:1128228
@@ -329,7 +329,7 @@
     QColor color        = data->colorScheme()->colorNamed( colorString );
     QColor colorExtra = data->colorScheme()->colorNamed( "HSTColor" );
 
-    m_hideLabels =  ( map->isSlewing() && Options::hideLabels() ) ||
+    m_hideLabels =  ( map->isSlewing() && Options::hideOnSlew() ) ||
                     ! ( Options::showDeepSkyMagnitudes() || Options::showDeepSkyNames() );
 
 
@@ -387,8 +387,9 @@
                 double PositionAngle = map->findPA( obj, o.x(), o.y() );
 
                 //Draw Image
+                bool imgdrawn = false;
                 if ( drawImage && Options::zoomFactor() > 5.*MINZOOM ) {
-                    obj->drawImage( psky, o.x(), o.y(), PositionAngle, Options::zoomFactor() );
+                    imgdrawn = obj->drawImage( psky, o.x(), o.y(), PositionAngle, Options::zoomFactor() );
                 }
 
                 //Draw Symbol
@@ -412,7 +413,7 @@
                     }
                 }
 
-                if ( !( drawObject || drawImage )  && ( m_hideLabels || mag > labelMagLim ) ) continue;
+                if ( !( drawObject || imgdrawn )  || ( m_hideLabels || mag > labelMagLim ) ) continue;
             
                 addLabel( o, obj );
             }


More information about the Kstars-devel mailing list