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

List:       kstars-devel
Subject:    [Kstars-devel] KDE/kdeedu/kstars/kstars/tools
From:       Akarsh Simha <akarshsimha () gmail ! com>
Date:       2008-10-03 1:32:28
Message-ID: 1222997548.890329.26290.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 867188 by asimha:

The conjunctions tool must object if both objects selected are the
same.

Thanks for the patch, Prakash.

CCMAIL: kstars-devel@kde.org



 M  +6 -3      conjunctions.cpp  


--- trunk/KDE/kdeedu/kstars/kstars/tools/conjunctions.cpp #867187:867188
@@ -138,11 +138,11 @@
                 break;
             }
             case 9: {
-                Object1 = (KSComet *) new KSComet( (KSComet &) *fd.selectedObject() );
+                Object1 =  new KSComet( (KSComet &) *fd.selectedObject() );
                 break;
             }
             case 10: {
-                Object1 = (KSAsteroid *) new KSAsteroid( (KSAsteroid &) *fd.selectedObject() );
+                Object1 =  new KSAsteroid( (KSAsteroid &) *fd.selectedObject() );
                 break;
             }
             }
@@ -179,7 +179,10 @@
         return;
     }
     Object2 = KSPlanetBase::createPlanet( Obj2ComboBox->currentIndex() );
-
+    if( Object1->name() == Object2->name() ) {
+    	KMessageBox::sorry( 0 , i18n("Please select two different objects to check conjunctions with.") );
+    	return;
+    }
     QApplication::setOverrideCursor( QCursor(Qt::WaitCursor) );
     KSConjunct ksc;
     ComputeStack->setCurrentIndex( 1 );
_______________________________________________
Kstars-devel mailing list
Kstars-devel@kde.org
https://mail.kde.org/mailman/listinfo/kstars-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

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