[Kstars-devel] KDE/kdeedu/kstars/kstars/tools
Akarsh Simha
akarshsimha at gmail.com
Fri Oct 3 03:32:28 CEST 2008
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 at 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 );
More information about the Kstars-devel
mailing list