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

James Bowlin bowlin at mindspring.com
Wed Aug 15 02:15:01 CEST 2007


SVN commit 700173 by jbowlin:

Scaled the asteroid label mag limit the same way the star label mag
limit was scaled.

CCMAIL: kstars-devel at kde.org


 M  +8 -1      asteroidscomponent.cpp  


--- trunk/KDE/kdeedu/kstars/kstars/skycomponents/asteroidscomponent.cpp #700172:700173
@@ -102,8 +102,15 @@
 	
 	SkyMap *map = ks->map();
 	bool hideLabels =  ! Options::showAsteroidNames() || (map->isSlewing() && Options::hideLabels() );
-	float labelMagLimit  =  Options::magLimitAsteroidName();
 
+	double lgmin = log10(MINZOOM);
+	double lgmax = log10(MAXZOOM);
+	double lgz = log10(Options::zoomFactor());
+	double labelMagLimit  =  Options::magLimitAsteroidName();
+	labelMagLimit += ( 20.0 - labelMagLimit ) * ( lgz - lgmin) / (lgmax - lgmin );
+	if ( labelMagLimit > 10.0 ) labelMagLimit = 10.0;
+	//printf("labelMagLim = %.1f\n", labelMagLimit );
+
     psky.setBrush( QBrush( QColor( "gray" ) ) );
 
 	foreach ( SkyObject *o, objectList() ) { 


More information about the Kstars-devel mailing list