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

Akarsh Simha akarshsimha at gmail.com
Sat Dec 20 23:41:07 CET 2008


SVN commit 899484 by asimha:

Forgot to include the Moon and the Sun in a switch case. Added the
creation of a copy using KPlanetBase::createPlanet() as the default
case, which works for all solar system bodies except asteroids and
planets.

This fixes the crash reported as bug #178249

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



 M  +5 -4      conjunctions.cpp  


--- trunk/KDE/kdeedu/kstars/kstars/tools/conjunctions.cpp #899483:899484
@@ -133,10 +133,6 @@
         }
         else {
             switch( fd.selectedObject()->type() ) {
-            case 2: {
-                Object1 = KSPlanetBase::createPlanet( pNames.key( fd.selectedObject()->name() ) ); // TODO: Fix i18n issues.
-                break;
-            }
             case 9: {
                 Object1 =  new KSComet( (KSComet &) *fd.selectedObject() );
                 break;
@@ -145,7 +141,12 @@
                 Object1 =  new KSAsteroid( (KSAsteroid &) *fd.selectedObject() );
                 break;
             }
+            case 2: 
+            default: {
+                Object1 = KSPlanetBase::createPlanet( pNames.key( fd.selectedObject()->name() ) ); // TODO: Fix i18n issues.
+                break;
             }
+            }
         }
         if( Object1 )
             Obj1FindButton->setText( Object1->name() );


More information about the Kstars-devel mailing list