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

Akarsh Simha akarshsimha at gmail.com
Sun Oct 4 01:21:05 CEST 2009


SVN commit 1031093 by asimha:

Fixing bug 188637 by implementing the following two features:

1. Ignore refraction corrections when the horizon is switched off

2. Issue an information message about this when the horizon is
   switched off

Many thanks to Adhiraj Alai who contributed to this fix.

CCMAIL: kstars-devel at kde.org
BUG: 188637



 M  +8 -0      kstarsactions.cpp  
 M  +2 -1      skymap.cpp  


--- trunk/KDE/kdeedu/kstars/kstars/kstarsactions.cpp #1031092:1031093
@@ -148,6 +148,14 @@
         }
     } else if ( a == actionCollection()->action( "show_horizon" ) ) {
         Options::setShowGround( a->isChecked() );
+        if( !a->isChecked() && Options::useRefraction() ) {
+           QString caption = i18n( "Refraction effects disabled" );
+           QString message = i18n( "When the horizon is switched off, refraction effects are temporarily disabled." );
+    
+           KMessageBox::information( this, message, caption, "dag_refract_hide_ground" );
+        }
+
+
         if ( kcd ) {
             opguides->kcfg_ShowGround->setChecked( a->isChecked() );
         }
--- trunk/KDE/kdeedu/kstars/kstars/skymap.cpp #1031092:1031093
@@ -1,4 +1,4 @@
-/***************************************************************************
+/**************************************************************************
                           skymap.cpp  -  K Desktop Planetarium
                              -------------------
     begin                : Sat Feb 10 2001
@@ -1434,6 +1434,7 @@
 }
 
 dms SkyMap::refract( const dms *alt, bool findApparent ) {
+    if (!Options::showGround()) return *alt;
     if ( alt->Degrees() <= -2.000 ) return dms( alt->Degrees() );
 
     int index = int( ( alt->Degrees() + 2.0 )*2. );  //RefractCorr arrays start at alt=-2.0 degrees.


More information about the Kstars-devel mailing list