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

James Bowlin bowlin at mindspring.com
Tue Sep 4 04:21:58 CEST 2007


SVN commit 708168 by jbowlin:

Fixed a potential bug in LineListIndex::drawLines() where the new
onscreenLine() routine could modify oThis before it is copied to oLast
for the drawing of the next segment.  I'm not certain this would ever
cause a problem because onscreenLine()  only modifies points that are
off-screen but neither am I certain that it will never occur, hence
the fix.

Also, my previous commit added the following line to the top of the
htmesh/CMakeLists.txt file:

KDE4_NO_ENABLE_FINAL(htmesh)

CCMAIL: kstars-devel at kde.org


 M  +3 -3      linelistindex.cpp  


--- trunk/KDE/kdeedu/kstars/kstars/skycomponents/linelistindex.cpp #708167:708168
@@ -241,7 +241,7 @@
 	QPolygonF polyMW;
 	bool isVisible, isVisibleLast;
     SkyPoint  *pLast, *pThis;
-    QPointF oThis, oLast, oMid;
+    QPointF oThis, oThis2, oLast, oMid;
 
     MeshIterator region( skyMesh(), drawBuffer() );
     while ( region.hasNext() ) {
@@ -264,7 +264,7 @@
 
             for ( int i = 1 ; i < points->size() ; i++ ) {
                 pThis = points->at( i );
-                oThis = map->toScreen( pThis, scale, false, &isVisible );
+                oThis2 = oThis = map->toScreen( pThis, scale, false, &isVisible );
 
                 if ( map->onScreen( oThis, oLast) && ! skipAt( lineList, i ) ) {
 
@@ -287,7 +287,7 @@
                 }
 
                 pLast = pThis;
-                oLast = oThis;
+                oLast = oThis2;
                 isVisibleLast = isVisible;
             }
         }


More information about the Kstars-devel mailing list