[Kstars-devel] branches/kstars/unfrozen/kstars/kstars
Jason Harris
kstars at 30doradus.org
Thu Jul 3 06:24:28 CEST 2008
SVN commit 827471 by harris:
porting small angular ruler fix from trunk (r827409)
CCMAIL: kstars-devel at kde.org
M +8 -5 skymap.cpp
--- branches/kstars/unfrozen/kstars/kstars/skymap.cpp #827470:827471
@@ -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 );
@@ -463,7 +466,7 @@
ks->statusBar()->changeItem( sbMessage, 0 );
- AngularRuler.clear();
+ AngularRuler.clear();
}
}
More information about the Kstars-devel
mailing list