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

Akarsh Simha akarshsimha at gmail.com
Tue Jul 14 23:12:06 CEST 2009


SVN commit 996767 by asimha:

Making forceUpdate() do what it claims to do.

forceUpdate() claims to recompute all object positions, whereas stars
were left out of this after JIT Update was introduced.

This commit makes sure that the update IDs are incremented when
forceUpdate() is called, thus making sure that star positions are
recomputed as well.

CCMAIL: bowlin at mindspring.com, kstars-devel at kde.org



 M  +6 -0      kstarsdata.cpp  
 M  +4 -0      kstarsdata.h  
 M  +4 -0      skymap.cpp  


--- trunk/KDE/kdeedu/kstars/kstars/kstarsdata.cpp #996766:996767
@@ -357,6 +357,12 @@
     m_updateNum = KSNumbers( m_preUpdateNum );
 }
 
+unsigned int KStarsData::incUpdateID() {
+    m_preUpdateID++;
+    m_preUpdateNumID++;
+    syncUpdateIDs();
+}
+
 void KStarsData::setFullTimeUpdate() {
     //Set the update markers to invalid dates to trigger updates in each category
     LastSkyUpdate = KDateTime();
--- trunk/KDE/kdeedu/kstars/kstars/kstarsdata.h #996766:996767
@@ -332,6 +332,10 @@
 
     void appendTelescopeObject(SkyObject * object);*/
 
+    /*@short Increments the updateID, forcing a recomputation of star positions as well
+     */
+    unsigned int incUpdateID();
+
     unsigned int updateID() { return m_updateID; }
     unsigned int updateNumID() { return m_updateNumID; }
     KSNumbers* updateNum()  { return &m_updateNum; }
--- trunk/KDE/kdeedu/kstars/kstars/skymap.cpp #996766:996767
@@ -1497,6 +1497,10 @@
     }
 
     computeSkymap = true;
+    
+    // Ensure that stars are recomputed
+    data->incUpdateID();
+
     if ( now ) repaint();
     else update();
 }


More information about the Kstars-devel mailing list