[Kstars-devel] KDE/kdeedu/kstars/kstars
Akarsh Simha
akarshsimha at gmail.com
Wed Jul 2 23:34:45 CEST 2008
SVN commit 827409 by asimha:
Reverting previous change from clickedPoint to previousClickedPoint,
which doesn't seem to have been necessary.
Thanks for the patch, Jason.
CCMAIL: kstars-devel at kde.org
M +9 -6 skymap.cpp
--- trunk/KDE/kdeedu/kstars/kstars/skymap.cpp #827408:827409
@@ -430,7 +430,8 @@
//If the cursor is near a SkyObject, reset the AngularRuler's
//start point to the position of the SkyObject
double maxrad = 1000.0/Options::zoomFactor();
- if ( SkyObject *so = data->skyComposite()->objectNearest( clickedPoint(), maxrad ) ) {
+ SkyObject *so = data->skyComposite()->objectNearest( clickedPoint(), maxrad );
+ if ( so ) {
AngularRuler.append( so );
AngularRuler.append( so );
} else {
@@ -449,11 +450,13 @@
//If the cursor is near a SkyObject, reset the AngularRuler's
//end point to the position of the SkyObject
double maxrad = 1000.0/Options::zoomFactor();
- if ( SkyObject *so = data->skyComposite()->objectNearest( previousClickedPoint(), maxrad ) ) {
+ SkyObject *so = data->skyComposite()->objectNearest( clickedPoint(), maxrad );
+ if ( so ) {
AngularRuler.setPoint( 1, so );
sbMessage = so->translatedLongName() + " ";
- } else
- AngularRuler.setPoint( 1, previousClickedPoint() );
+ } else {
+ AngularRuler.setPoint( 1, clickedPoint() );
+ }
angularDistanceMode=false;
AngularRuler.update( data );
@@ -462,8 +465,8 @@
sbMessage += i18n( "Angular distance: %1", angularDistance.toDMSString() );
ks->statusBar()->changeItem( sbMessage, 0 );
-
- AngularRuler.clear();
+
+ AngularRuler.clear();
}
}
More information about the Kstars-devel
mailing list