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

List:       kde-commits
Subject:    KDE/kdeedu/kstars/kstars
From:       Alexey Khudyakov <alexey.skladnoy () gmail ! com>
Date:       2011-03-11 16:56:02
Message-ID: 20110311165602.117B5AC8C9 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1224504 by khudyakov:

Remove TransientObjct from skymap. There is no need in it

 M  +0 -4      kstarsdcop.cpp  
 M  +0 -4      skycomponents/skymapcomposite.cpp  
 M  +1 -5      skymap.cpp  
 M  +2 -18     skymap.h  


--- trunk/KDE/kdeedu/kstars/kstars/kstarsdcop.cpp #1224503:1224504
@@ -114,8 +114,6 @@
     SkyObject *target = data()->objectNamed( name );
     if ( target != NULL ) {
 		    data()->skyComposite()->addNameLabel( target );
-        if( map()->transientObject() == target )
-            map()->setTransientObject( NULL );
         map()->forceUpdate();
     }
 }
@@ -124,8 +122,6 @@
     SkyObject *target = data()->objectNamed( name );
     if ( target != NULL ) {
 		    data()->skyComposite()->removeNameLabel( target );
-        if( map()->transientObject() == target )
-            map()->setTransientObject( NULL );
         map()->forceUpdate();
     }
 }
--- trunk/KDE/kdeedu/kstars/kstars/skycomponents/skymapcomposite.cpp #1224503:1224504
@@ -253,10 +253,6 @@
         m_ObservingList->list = &KStars::Instance()->observingList()->sessionList();
     m_ObservingList->draw( skyp );
 
-    if( map->transientObject() )
-        SkyLabeler::AddLabel( map->transientObject(), SkyLabeler::RUDE_LABEL );
-
-
     m_Flags->draw( skyp );
 
     m_StarHopRouteList->pen = QPen( QColor(data->colorScheme()->colorNamed( "StarHopRouteColor" )), 1. );
--- trunk/KDE/kdeedu/kstars/kstars/skymap.cpp #1224503:1224504
@@ -135,7 +135,7 @@
     QGraphicsView( KStars::Instance() ),
     computeSkymap(true), rulerMode(false), scrollCount(0),
     data( KStarsData::Instance() ), pmenu(0),
-    ClickedObject(0), FocusObject(0), TransientObject(0), m_proj(0)
+    ClickedObject(0), FocusObject(0), m_proj(0)
 {
     m_Scale = 1.0;
 
@@ -362,7 +362,6 @@
                      so->translatedLongName(),
                      QString::number(so->mag(), 'f', 1)),
                 this);
-            setTransientObject( so );
         }
     }
 }
@@ -681,9 +680,6 @@
 
 void SkyMap::slotAddObjectLabel() {
     data->skyComposite()->addNameLabel( clickedObject() );
-    //Since we just added a permanent label, we don't want it to fade away!
-    if ( transientObject() == clickedObject() )
-        setTransientObject( NULL );
     forceUpdate();
 }
 
--- trunk/KDE/kdeedu/kstars/kstars/skymap.h #1224503:1224504
@@ -237,23 +237,7 @@
     	*/
     void setFocusObject( SkyObject *o );
 
-    /**@short Retrieve the object nearest to the point at which the mouse has hovered.
-    	*
-    	*When the mouse hovers near an object, it is set as the TransientObject (so named
-    	*because a transient name label will be attached to it).  This function returns 
-    	*a pointer to the current TransientObject, or NULL if no TransientObject is set.
-    	*@return pointer to the SkyObject nearest to the mouse hover position.
-    	*@see SkyMap::slotTransientLabel()
-    	*/
-    SkyObject* transientObject() const { return TransientObject; }
-
-    /**@short Set the TransientObject pointer to the argument.
-    	*@param o pointer to the SkyObject to be assigned as the TransientObject.
-    	*/
-    void setTransientObject( SkyObject *o ) { TransientObject = o; }
-
-    /** @short Call to set up the projector before a draw cycle.
-      */
+    /** @short Call to set up the projector before a draw cycle. */
     void setupProjector();
 
     /** Set zoom factor. */
@@ -622,7 +606,7 @@
     SkyPoint m_MousePoint;
     
     SkyPoint  Focus, ClickedPoint, FocusPoint, Destination;
-    SkyObject *ClickedObject, *FocusObject, *TransientObject;
+    SkyObject *ClickedObject, *FocusObject;
 
     Projector *m_proj;
 
[prev in list] [next in list] [prev in thread] [next in thread] 

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