summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkarsh Simha <akarsh@kde.org>2016-08-17 01:06:29 (GMT)
committerAkarsh Simha <akarsh@kde.org>2016-08-17 01:06:29 (GMT)
commit51eea36e8907fba23eeaffd80088ce4628366af6 (patch)
tree4023afc680d05ad3c9523de5b695d12b964ad0e9
parent0dc3bfa9fba29ab23ccb7bc0b405d15c0bc75bff (diff)
Use the miscObjectComponent() SyncedCatalogComponent in the Find Dialog
The find dialog will now use the SyncedCatalogComponent to store objects resolved from the internet. This way, they become permanent and can be used as if they were always present in KStars.
-rw-r--r--kstars/dialogs/finddialog.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/kstars/dialogs/finddialog.cpp b/kstars/dialogs/finddialog.cpp
index e8fb152..1d67e0f 100644
--- a/kstars/dialogs/finddialog.cpp
+++ b/kstars/dialogs/finddialog.cpp
@@ -328,8 +328,9 @@ void FindDialog::slotOk() {
// any CatalogComponent.
CatalogEntryData cedata;
cedata = NameResolver::resolveName( processSearchText() );
- DeepSkyObject *dso = new DeepSkyObject( cedata );
+ DeepSkyObject *dso = 0;
if( ! std::isnan( cedata.ra ) && ! std::isnan( cedata.dec ) ) {
+ dso = KStarsData::Instance()->skyComposite()->miscObjectComponent()->addObject( cedata );
qDebug() << dso->ra0().toHMSString() << ";" << dso->dec0().toDMSString();
selObj = dso;
}