summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasem Mutlaq <[email protected]>2016-05-21 18:16:19 +0300
committerJasem Mutlaq <[email protected]>2016-05-21 18:16:19 +0300
commit35c5d9e346c204cd115947b9e1fa6ef287a99511 (patch)
tree531cd27df3bc26125059b2bac0c3410e5bb43305
parent5ad43a3b1f86d5c63bac43011da325c272ed2c0d (diff)
Fix build on Windows
-rw-r--r--kstars/tools/planetviewer.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/kstars/tools/planetviewer.cpp b/kstars/tools/planetviewer.cpp
index 9cb1bfc..7155462 100644
--- a/kstars/tools/planetviewer.cpp
+++ b/kstars/tools/planetviewer.cpp
@@ -219,10 +219,9 @@ void PlanetViewer::initPlotObjects() {
pw->map->addPlotObject( ksun );
//Read in the orbit curves
- KPlotObject *orbit[PlanetList.count()];
for ( int i=0; i< PlanetList.count(); ++i ) {
KSPlanetBase *p = PlanetList[i];
- orbit[i] = new KPlotObject( Qt::white, KPlotObject::Lines, 1.0 );
+ KPlotObject *orbit = new KPlotObject( Qt::white, KPlotObject::Lines, 1.0 );
QFile orbitFile;
QString orbitFileName = ( p->isMajorPlanet() ? ((KSPlanet *)p)->untranslatedName().toLower() : p->name().toLower() ) + ".orbit";
@@ -235,12 +234,12 @@ void PlanetViewer::initPlotObjects() {
if ( fields.size() == 3 ) {
x = fields[0].toDouble();
y = fields[1].toDouble();
- orbit[i]->addPoint( x, y );
+ orbit->addPoint( x, y );
}
}
}
- pw->map->addPlotObject( orbit[i] );
+ pw->map->addPlotObject( orbit );
}
for ( int i=0; i< PlanetList.count(); ++i ) {