[Kstars-devel] kdeedu/kstars/kstars
Jason Harris
kstars at 30doradus.org
Mon Aug 23 08:25:12 CEST 2004
CVS commit by harris:
Fixed bug where the primary name of a Messier object was displayed
twice, if it did not have a separate long name.
(TO BE BACKPORTED)
CCMAIL: kstars-devel at kde.org
M +7 -2 detaildialog.cpp 1.41
--- kdeedu/kstars/kstars/detaildialog.cpp #1.40:1.41
@@ -289,5 +289,5 @@ void DetailDialog::createGeneralTab( con
dso = (DeepSkyObject *)selectedObject;
- if ( ! dso->longname().isEmpty() ) {
+ if ( ! dso->longname().isEmpty() && dso->longname() != dso->name() ) {
pname = dso->translatedLongName();
oname = dso->translatedName();
@@ -295,5 +295,10 @@ void DetailDialog::createGeneralTab( con
pname = dso->translatedName();
}
- if ( ! dso->name2().isEmpty() ) oname += ", " + dso->translatedName2();
+
+ if ( ! dso->name2().isEmpty() ) {
+ if ( oname.isEmpty() ) oname = dso->translatedName2();
+ else oname += ", " + dso->translatedName2();
+ }
+
if ( dso->ugc() != 0 ) oname += ", UGC " + QString("%1").arg( dso->ugc() );
if ( dso->pgc() != 0 ) oname += ", PGC " + QString("%1").arg( dso->pgc() );
More information about the Kstars-devel
mailing list