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

List:       kde-commits
Subject:    KDE/kdeedu/kstars/kstars/skycomponents
From:       Alexey Khudyakov <alexey.skladnoy () gmail ! com>
Date:       2010-06-28 17:18:09
Message-ID: 20100628171809.74DBBAC8ED () svn ! kde ! org
[Download RAW message or body]

SVN commit 1143783 by khudyakov:

Remove LineListIndex::drawAllLines it was used only by Ecliptics
and it could happily use drawLines.

 M  +0 -6      ecliptic.cpp  
 M  +0 -42     linelistindex.cpp  
 M  +0 -8      linelistindex.h  


--- trunk/KDE/kdeedu/kstars/kstars/skycomponents/ecliptic.cpp #1143782:1143783
@@ -70,13 +70,7 @@
     psky.setPen( QPen( QBrush( color ), 1, Qt::SolidLine ) );
 
     m_label.reset( psky );
-
-    if ( ! skyMesh()->isZoomedIn() ) {
         drawLines( psky );
-    }
-    else {
-        drawAllLines( psky );
-    }
     m_label.draw( psky );
 }
 
--- trunk/KDE/kdeedu/kstars/kstars/skycomponents/linelistindex.cpp #1143782:1143783
@@ -171,48 +171,6 @@
 void LineListIndex::updateLabelCandidates( const QPointF& /*o*/, LineList* /*lineList*/, int /*i*/ )
 {}
 
-void LineListIndex::drawAllLines( QPainter& psky )
-{
-    SkyMap* map = SkyMap::Instance();
-    UpdateID updateID = KStarsData::Instance()->updateID();
-
-    bool isVisible, isVisibleLast;
-
-    for (int i = 0; i < m_listList.size(); i++) {
-        LineList* lineList = m_listList.at( i );
-
-        if ( lineList->updateID != updateID )
-            JITupdate( lineList );
-
-        SkyList* points = lineList->points();
-        SkyPoint* pLast = points->first();
-        QPointF oLast = map->toScreen( pLast, true, &isVisibleLast );
-
-        for ( int j = 1 ; j < points->size() ; j++ ) {
-            SkyPoint* pThis = points->at( j );
-            QPointF   oThis = map->toScreen( pThis, true, &isVisible );
-
-            if ( map->onScreen( oThis, oLast) && ! skipAt( lineList, j ) ) {
-                if ( isVisible && isVisibleLast ) {
-                    psky.drawLine( oLast, oThis );
-                    updateLabelCandidates( oThis, lineList, j );
-                } else if ( isVisibleLast ) {
-                    QPointF oMid = map->clipLineI( pLast, pThis );
-                    psky.drawLine( oLast, oMid );
-                } else if ( isVisible ) {
-                    QPointF oMid = map->clipLineI( pThis, pLast );
-                    psky.drawLine( oMid, oThis );
-                }
-            }
-
-            pLast = pThis;
-            oLast = oThis;
-            isVisibleLast = isVisible;
-        }
-    }
-}
-
-
 void LineListIndex::drawLines( QPainter& psky )
 {
     SkyMap *map = SkyMap::Instance();
--- trunk/KDE/kdeedu/kstars/kstars/skycomponents/linelistindex.h #1143782:1143783
@@ -107,14 +107,6 @@
      */
     void appendBoth( LineList* lineList, int debug=0 );
 
-    /* @short Draws all the lines without making use of the index.  Used by
-     * NoPrecessIndex for cases when the screen is zoomed out and creating
-     * the 2nd mesh buffer would be more expensive than just drawing
-     * everything.  There are no filled versions of the "All" routines
-     * simply because they were not needed.
-     */
-    void drawAllLines( QPainter &psky );
-
     /* @short Draws all the lines in m_listList as simple lines in float
      * mode.
      */
[prev in list] [next in list] [prev in thread] [next in thread] 

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