summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasem Mutlaq <mutlaqja@ikarustech.com>2016-06-02 21:59:13 (GMT)
committerArtem Fedoskin <afedoskin3@gmail.com>2016-06-04 21:37:19 (GMT)
commit63ff1e825f658ad5b5353701cd244d95603130ee (patch)
tree0980b0c6ff0d42ce28cf973da0ab02699055884d
parent3fb113b19138ec79fef270d987947eb5f0022d34 (diff)
Use QStringList removeDuplicates to remove any duplicates for now until a re-work is done for DSO classes
-rw-r--r--kstars/skycomponents/catalogcomponent.cpp4
-rw-r--r--kstars/skycomponents/deepskycomponent.cpp5
2 files changed, 8 insertions, 1 deletions
diff --git a/kstars/skycomponents/catalogcomponent.cpp b/kstars/skycomponents/catalogcomponent.cpp
index 31ee007..c3d6084 100644
--- a/kstars/skycomponents/catalogcomponent.cpp
+++ b/kstars/skycomponents/catalogcomponent.cpp
@@ -71,6 +71,10 @@ void CatalogComponent::loadData() {
}
}
+ // Remove Duplicates
+ foreach(QStringList list, objectNames())
+ list.removeDuplicates();
+
CatalogData loaded_catalog_data;
KStarsData::Instance()->catalogdb()->GetCatalogData(m_catName, loaded_catalog_data);
m_catPrefix = loaded_catalog_data.prefix;
diff --git a/kstars/skycomponents/deepskycomponent.cpp b/kstars/skycomponents/deepskycomponent.cpp
index a4cec89..432a403 100644
--- a/kstars/skycomponents/deepskycomponent.cpp
+++ b/kstars/skycomponents/deepskycomponent.cpp
@@ -161,7 +161,7 @@ void DeepSkyComponent::loadData()
float mag(1000.0);
int type, ingc, imess(-1), pa;
int pgc, ugc;
- QString con, ss, name, name2, longname;
+ QString ss, name, name2, longname;
QString cat2;
// Designation
@@ -318,6 +318,9 @@ void DeepSkyComponent::loadData()
deep_sky_parser.ShowProgress();
}
+
+ foreach(QStringList list, objectNames())
+ list.removeDuplicates();
}
void DeepSkyComponent::mergeSplitFiles() {