[Kstars-devel] kdeedu/kstars/kstars
Jason Harris
kstars at 30doradus.org
Mon Feb 7 07:07:38 CET 2005
CVS commit by harris:
Don't assign a Transient Label to an object if it already has a
permanent User label (otherwise, the label still fades away momentarily,
and then "pops" back in).
Similarly, when adding a user label to an object (with the popup menu or
the "L" key), remove the object's "transient label" status to avoid the
same "fade away then pop back" effect.
CCMAIL: kstars-devel at kde.org
M +4 -2 skymap.cpp 1.152
--- kdeedu/kstars/kstars/skymap.cpp #1.151:1.152
@@ -424,10 +424,10 @@ void SkyMap::slotTransientLabel( void )
//
//Do not show a transient label if the map is in motion, or if the mouse
- //pointer is below the opaque horizon
+ //pointer is below the opaque horizon, or if the object has a permanent label
if ( ! slewing && ! ( Options::useAltAz() && Options::showGround() &&
mousePoint()->alt()->Degrees() < 0.0 ) ) {
SkyObject *so = objectNearest( mousePoint() );
- if ( so ) {
+ if ( so && ! isObjectLabeled( so ) ) {
setTransientObject( so );
@@ -691,4 +691,6 @@ void SkyMap::slotRemoveObjectLabel( void
void SkyMap::slotAddObjectLabel( void ) {
data->ObjLabelList.append( clickedObject() );
+ //Since we just added a permanent label, we don't want it to fade away!
+ if ( transientObject() == clickedObject() ) setTransientObject( NULL );
forceUpdate();
}
More information about the Kstars-devel
mailing list