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

List:       kde-commits
Subject:    KDE/kdeedu/kstars/kstars
From:       Akarsh Simha <akarshsimha () gmail ! com>
Date:       2008-05-29 19:48:15
Message-ID: 1212090495.312034.1167.nullmailer () svn ! kde ! org
[Download RAW message or body]

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@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 
[prev in list] [next in list] [prev in thread] [next in thread] 

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