summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcos CARDINOT <mcardinot@gmail.com>2016-07-19 20:14:23 (GMT)
committerMarcos CARDINOT <mcardinot@gmail.com>2016-07-19 20:14:23 (GMT)
commit65edfe79d0b35c0881d8a29f82961eb947a989d6 (patch)
tree395073346479de3b48ca58867dfba24f34f1c04c
parentfa79e0db31fe46d4cd494a9c39ee23df976ae79a (diff)
DetailDialog - minor code cleanup
-rw-r--r--kstars/dialogs/detaildialog.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/kstars/dialogs/detaildialog.cpp b/kstars/dialogs/detaildialog.cpp
index add0941..2192aa4 100644
--- a/kstars/dialogs/detaildialog.cpp
+++ b/kstars/dialogs/detaildialog.cpp
@@ -428,19 +428,14 @@ void DetailDialog::createGeneralTab()
break;
}
- case SkyObject::SUPERNOVA: {
- break;
- }
}
//Common to all types:
- if ( selectedObject->type() == SkyObject::CONSTELLATION )
- Data->ObjectTypeInConstellation->setText(
- KStarsData::Instance()->skyComposite()->getConstellationBoundary()->constellationName(selectedObject));
- else
- Data->ObjectTypeInConstellation->setText(
- i18nc("%1 type of sky object (planet, asteroid etc), %2 name of a constellation", "%1 in %2", objecttyp,
- KStarsData::Instance()->skyComposite()->getConstellationBoundary()->constellationName(selectedObject)));
+ QString cname = KStarsData::Instance()->skyComposite()->getConstellationBoundary()->constellationName(selectedObject);
+ if (selectedObject->type() != SkyObject::CONSTELLATION) {
+ cname = i18nc("%1 type of sky object (planet, asteroid etc), %2 name of a constellation", "%1 in %2", objecttyp, cname);
+ }
+ Data->ObjectTypeInConstellation->setText(cname);
}
void DetailDialog::createPositionTab( const KStarsDateTime &ut, GeoLocation *geo ) {