Commit a759b43a authored by Akarsh Simha's avatar Akarsh Simha

Set the pointer to the CatalogComponent from DeepSkyObject c'tor

parent 9842e1be
......@@ -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;
......
......@@ -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();
}
......
......@@ -71,7 +71,7 @@ public:
*/
DeepSkyObject(const DeepSkyObject &o );
DeepSkyObject( const CatalogEntryData &data );
DeepSkyObject( const CatalogEntryData &data, CatalogComponent *cat = 0 );
QString labelString() const;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment