summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasem Mutlaq <mutlaqja@ikarustech.com>2016-11-15 10:15:10 (GMT)
committerJasem Mutlaq <mutlaqja@ikarustech.com>2016-11-15 10:15:10 (GMT)
commitfcbacdf52b8f6500f1dabb57bb7b0411d1f5b208 (patch)
tree37122a1c4fd5e787c7c45fa91326f1ace212bc8e
parentcb99a35f6e6b56e3bbb5e9012af263c0f23d266b (diff)
Do not set time as it is already set in SimClock ctor
-rw-r--r--kstars/kstars.cpp3
-rw-r--r--kstars/time/simclock.h2
2 files changed, 4 insertions, 1 deletions
diff --git a/kstars/kstars.cpp b/kstars/kstars.cpp
index 6fe8c31..01c0d1c 100644
--- a/kstars/kstars.cpp
+++ b/kstars/kstars.cpp
@@ -129,8 +129,11 @@ KStars::KStars( bool doSplash, bool clockrun, const QString &startdate )
else
data()->changeDateTime( KStarsDateTime::currentDateTimeUtc() );
}
+ // JM 2016-11-15: Not need to set it again as it was initialized in the ctor of SimClock
+ /*
else
data()->changeDateTime( KStarsDateTime::currentDateTimeUtc() );
+ */
// Initialize clock. If --paused is not in the comand line, look in options
if ( clockrun )
diff --git a/kstars/time/simclock.h b/kstars/time/simclock.h
index 317bb8c..30ea0ce 100644
--- a/kstars/time/simclock.h
+++ b/kstars/time/simclock.h
@@ -42,7 +42,7 @@ public:
* @param parent parent object for the clock
* @param when the date/time to which the SimClock should be initialized in UTC
*/
- explicit SimClock(QObject *parent = 0, const KStarsDateTime &when = KStarsDateTime::currentDateTime() );
+ explicit SimClock(QObject *parent = 0, const KStarsDateTime &when = KStarsDateTime::currentDateTimeUtc() );
/** @return const reference to the current simulation Universal Time. */
const KStarsDateTime& utc() const { return UTC; }