summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkarsh Simha <akarsh@kde.org>2016-08-17 10:33:27 (GMT)
committerAkarsh Simha <akarsh@kde.org>2016-08-17 10:47:54 (GMT)
commita759b43ac20d7375fda62286960234744559e68b (patch)
tree977222d9bef9e52067d98142449eadc704189df3
parent9842e1be25d22e6f654b27fa49f66657f0bccd6f (diff)
Set the pointer to the CatalogComponent from DeepSkyObject c'tor
-rw-r--r--kstars/skycomponents/syncedcatalogcomponent.cpp2
-rw-r--r--kstars/skyobjects/deepskyobject.cpp4
-rw-r--r--kstars/skyobjects/deepskyobject.h2
3 files changed, 4 insertions, 4 deletions
diff --git a/kstars/skycomponents/syncedcatalogcomponent.cpp b/kstars/skycomponents/syncedcatalogcomponent.cpp
index 5870e46..2bef403 100644
--- a/kstars/skycomponents/syncedcatalogcomponent.cpp
+++ b/kstars/skycomponents/syncedcatalogcomponent.cpp
@@ -85,7 +85,7 @@ DeepSkyObject *SyncedCatalogComponent::addObject( CatalogEntryData catalogEntry
return 0;
m_catCount++;
qDebug() << "Added object " << catalogEntry.long_name << " into database!";
- DeepSkyObject *newObj = new DeepSkyObject( catalogEntry ); // FIXME: What about stars? Are they treated as DeepSkyObjects, type CATALOG_STAR? -- asimha
+ DeepSkyObject *newObj = new DeepSkyObject( catalogEntry, this ); // FIXME: What about stars? Are they treated as DeepSkyObjects, type CATALOG_STAR? -- asimha
Q_ASSERT( newObj );
qDebug() << "Created new DSO for " << catalogEntry.long_name;
diff --git a/kstars/skyobjects/deepskyobject.cpp b/kstars/skyobjects/deepskyobject.cpp
index 5d660a3..edb2b91 100644
--- a/kstars/skyobjects/deepskyobject.cpp
+++ b/kstars/skyobjects/deepskyobject.cpp
@@ -71,7 +71,7 @@ DeepSkyObject::DeepSkyObject( int t, dms r, dms d, float m,
loadImage();
}
-DeepSkyObject::DeepSkyObject( const CatalogEntryData &data )
+DeepSkyObject::DeepSkyObject( const CatalogEntryData &data, CatalogComponent *cat )
{
// FIXME: This assumes that CatalogEntryData coordinates have
// J2000.0 as epoch as opposed to the catalog's epoch!!! -- asimha
@@ -93,7 +93,7 @@ DeepSkyObject::DeepSkyObject( const CatalogEntryData &data )
UGC = 0;
setCatalog( data.catalog_name );
updateID = updateNumID = 0;
- customCat = NULL; // <-- FIXME!
+ customCat = cat;
Flux = data.flux;
loadImage();
}
diff --git a/kstars/skyobjects/deepskyobject.h b/kstars/skyobjects/deepskyobject.h
index 2e4d8f0..6f15090 100644
--- a/kstars/skyobjects/deepskyobject.h
+++ b/kstars/skyobjects/deepskyobject.h
@@ -71,7 +71,7 @@ public:
*/
DeepSkyObject(const DeepSkyObject &o );
- DeepSkyObject( const CatalogEntryData &data );
+ DeepSkyObject( const CatalogEntryData &data, CatalogComponent *cat = 0 );
QString labelString() const;