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

Akarsh Simha akarshsimha at gmail.com
Thu May 29 21:48:15 CEST 2008


SVN commit 814267 by asimha:

+ Fixing selection of end-point of Angular distance computation. The
correct call to do was previousClickedPoint() and not clickedPoint().

+ Fixing updating of PreviousClickedPoint by re-implementing
setClickedPoint().

+ Ensuring that the angular distance ruler is drawn with the correct
end-points.

CCMAIL: kstars-devel at kde.org



 M  +10 -4     skymap.cpp  
 M  +1 -1      skymap.h  


--- trunk/KDE/kdeedu/kstars/kstars/skymap.cpp #814266:814267
@@ -449,12 +449,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( clickedPoint(), maxrad ) ) {
+        if ( SkyObject *so = data->skyComposite()->objectNearest( previousClickedPoint(), maxrad ) ) {
             AngularRuler.setPoint( 1, so );
             sbMessage = so->translatedLongName() + "   ";
         } else
-            AngularRuler.setPoint( 1, clickedPoint() );
+            AngularRuler.setPoint( 1, previousClickedPoint() );
 
+        angularDistanceMode=false;
         AngularRuler.update( data );
 
         angularDistance = AngularRuler.angularSize();
@@ -462,7 +463,6 @@
 
         ks->statusBar()->changeItem( sbMessage, 0 );
 
-        angularDistanceMode=false;
 	AngularRuler.clear();
     }
 }
@@ -658,6 +658,11 @@
     emit destinationChanged();
 }
 
+void SkyMap::setClickedPoint( SkyPoint *f ) { 
+    PreviousClickedPoint.set(ClickedPoint.ra(), ClickedPoint.dec());
+    ClickedPoint.set( f->ra(), f->dec() );
+}
+
 void SkyMap::updateFocus() {
     if ( slewing ) return;
 
@@ -1694,7 +1699,8 @@
 }
 
 void SkyMap::updateAngleRuler() {
-    AngularRuler.setPoint( 1, mousePoint() );
+    if(isAngleMode() && (!pmenu || !pmenu -> isVisible()))
+        AngularRuler.setPoint( 1, mousePoint() );
     AngularRuler.update( data );
 }
 
--- trunk/KDE/kdeedu/kstars/kstars/skymap.h #814266:814267
@@ -256,7 +256,7 @@
     /**@short Set the ClickedPoint to the skypoint given as an argument.
     	*@param f pointer to the new ClickedPoint.
     	*/
-    void setClickedPoint( SkyPoint *f ) { ClickedPoint.set( f->ra(), f->dec() ); }
+    void setClickedPoint( SkyPoint *f );
 
     /**@short Retrieve the PreviousClickedPoint position.
     	*@return a pointer to PreviousClickedPoint, the sky coordinates of the 


More information about the Kstars-devel mailing list