[Kstars-devel] KDE/kdeedu/kstars/kstars
Jason Harris
kstars at 30doradus.org
Mon Mar 13 07:40:57 CET 2006
SVN commit 518095 by harris:
name label fixes:
+ If a star has a genetive name but no common name, just show the
genetive name ("eta Orionis") instead of "star (eta Orionis)"
+ If the transientObject becomes the focusObject while the transient
label is active, abort fading out the transient label. Otherwise the
label fades away, and then "snaps" back.
I'm going to backport this second fix...
CCMAIL: kstars-devel at kde.org
M +7 -0 skymap.cpp
M +3 -2 starobject.cpp
--- trunk/KDE/kdeedu/kstars/kstars/skymap.cpp #518094:518095
@@ -210,6 +210,13 @@
//Slots
void SkyMap::slotTransientTimeout( void ) {
+ //Don't fade label if the transientObject is now the focusObject!
+ if ( transientObject() == focusObject() ) {
+ setTransientObject( NULL );
+ TransientTimer.stop();
+ return;
+ }
+
//to fade the labels, we will need to smoothly transition from UserLabelColor to SkyColor.
QColor c1 = data->colorScheme()->colorNamed( "UserLabelColor" );
QColor c2 = data->colorScheme()->colorNamed( "SkyColor" );
--- trunk/KDE/kdeedu/kstars/kstars/starobject.cpp #518094:518095
@@ -274,8 +274,9 @@
void StarObject::drawLabel( QPainter &psky, float x, float y, double zoom, bool drawName, bool drawMag, double scale ) {
QString sName( i18n("star") + " " );
if ( drawName ) {
- if ( name() != "star" ) sName = translatedName() + " ";
- else if ( longname() != "star" ) sName = translatedLongName() + " ";
+ if ( translatedName() != i18n("star") && ! translatedName().isEmpty() )
+ sName = translatedName() + " ";
+ else if ( ! gname().trimmed().isEmpty() ) sName = gname( true ) + " ";
}
if ( drawMag ) {
if ( drawName )
More information about the Kstars-devel
mailing list