summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasem Mutlaq <mutlaqja@ikarustech.com>2016-11-01 07:43:42 (GMT)
committerJasem Mutlaq <mutlaqja@ikarustech.com>2016-11-01 07:43:42 (GMT)
commit31240e60138af9890001b38b330ff7bcc4a10498 (patch)
treee98d911c7e00ae83f3684d10b439fa445651e5a3
parentff744aca3747e0b36d63b48637bbb542ee5704e3 (diff)
Make group as unknown if it is empty
-rw-r--r--kstars/indi/indigroup.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/kstars/indi/indigroup.cpp b/kstars/indi/indigroup.cpp
index e7cbbcc..d1c4f71 100644
--- a/kstars/indi/indigroup.cpp
+++ b/kstars/indi/indigroup.cpp
@@ -25,6 +25,8 @@
#include <QDebug>
#include <QScrollArea>
+#include <KLocalizedString>
+
/*******************************************************************
** INDI Group: a tab widget for common properties. All properties
** belong to a group, whether they have one or not but how the group
@@ -33,7 +35,7 @@
INDI_G::INDI_G(INDI_D *idv, const QString &inName)
{
dp = idv;
- name = inName;
+ name = (inName.isEmpty()) ? i18n("Unknown") : inName;
propertyContainer = new QFrame(idv);
propertyLayout = new QVBoxLayout(propertyContainer);
@@ -78,8 +80,6 @@ bool INDI_G::addProperty(INDI::Property *prop)
bool INDI_G::removeProperty(const QString &probName)
{
-
-
foreach(INDI_P * pp, propList)
{
if (pp->getName() == probName)