Commit 4f15bc70 authored by Robert Lancaster's avatar Robert Lancaster Committed by Jasem Mutlaq

This patch should fix a problem I found in Whats Interesting. The problem was...

This patch should fix a problem I found in Whats Interesting.  The problem was that the satellite positions were not updating and I found that the planets and satellites didn't move when selected from whats interesting.  The reason was because I had cloned the objects.  The clone will not update.  I really needed to use the original skyobjects.  So this fixes that.
parent a3646d75
......@@ -62,7 +62,7 @@ void ModelManager::loadLists()
QPair<QString, const SkyObject *> pair = listStars.value(i);
const StarObject * star = dynamic_cast<const StarObject *>(pair.second);
if(star->hasLatinName())
m_ObjectList[Stars].append(new SkyObjItem(star->clone()));
m_ObjectList[Stars].append(new SkyObjItem((SkyObject *)(star)));
}
QString prevName;
for(int i = 0; i < m_ObjectList[Stars].size(); i++)
......@@ -234,7 +234,7 @@ void ModelManager::loadObjectList(QList<SkyObjItem *> & skyObjectList, int type)
QPair<QString, const SkyObject *> pair = objects.value(i);
const SkyObject * listObject = dynamic_cast<const SkyObject *>(pair.second);
if(listObject->name() != "Sun")
skyObjectList.append(new SkyObjItem(listObject->clone()));
skyObjectList.append(new SkyObjItem((SkyObject *)(listObject)));
}
QString prevName;
for(int i = 0; i < skyObjectList.size(); i++)
......
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