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

Jason Harris kstars at 30doradus.org
Tue Jul 15 23:14:01 CEST 2008


SVN commit 832958 by harris:

Don't show unnmaed stars when the user searcvhes for white space in
the find dialog.  Will backport to 4.1 as well.

Thank you very much for the patch, Prakash!

CCMAIL: kstars-devel at kde.org



 M  +11 -6     starobject.cpp  


--- trunk/KDE/kdeedu/kstars/kstars/starobject.cpp #832957:832958
@@ -85,11 +85,9 @@
     if ( hasName() ) {
         lname = n;
         if ( hasName2() ) lname += " (" + gname() + ')';
-    } else if ( hasName2() )
+    } else if ( hasName2() ) {
         lname = gname();
-
-    //If genetive name exists, but no primary name, set primary name = genetive name.
-    if ( hasName2() && !hasName() ) {
+        //If genetive name exists, but no primary name, set primary name = genetive name.
         setName( gname() );
     }
 
@@ -114,8 +112,11 @@
     if ( hasName() ) {
         lname = n;
         if ( hasName2() )lname += " (" + gname() + ')';
-    } else if ( hasName2() )
+    } else if ( hasName2() ) {
         lname = gname();
+        //If genetive name exists, but no primary name, set primary name = genetive name.
+        setName( gname() );
+    }
     
     setLongName(lname);
     updateID = updateNumID = 0;
@@ -166,6 +167,7 @@
     Multiplicity = stardata->flags & 0x02;
     Variability = stardata->flags & 0x04 ;
     updateID = updateNumID = 0;
+	
 
     // DEBUG Edit. For testing proper motion. Uncomment all related blocks to test.
     // WARNING: You can debug only ONE STAR AT A TIME, because
@@ -383,7 +385,10 @@
 }
 
 QString StarObject::gname( bool useGreekChars ) const {
-    return greekLetter( useGreekChars ) + ' ' + constell();
+    if(!name2().isEmpty())
+        return greekLetter( useGreekChars ) + ' ' + constell();
+    else
+        return QString();
 }
 
 QString StarObject::greekLetter( bool gchar ) const {


More information about the Kstars-devel mailing list