]> vaikene.ee Git - evaf/commitdiff
When setting the current epoch, update the current date/time ScosTime
authorEnar Väikene <enar@vaikene.net>
Tue, 10 Sep 2013 12:22:10 +0000 (15:22 +0300)
committerEnar Väikene <enar@vaikene.net>
Tue, 10 Sep 2013 12:22:10 +0000 (15:22 +0300)
only if it was set from a CUC HEX string.

src/apps/ScosTime/gui.cpp

index ed7f09841dbc2f0d0a729d50aa22b8e3490be1ee..74d980ef58fac19ddc414a0f11e9f93f76d3bdf2 100644 (file)
@@ -91,7 +91,8 @@ void Internal::DateTime::setEpoch(QDateTime const & epoch)
 
     if (epoch != mEpoch)
     {
-        if (mDateTime.isValid())
+        // Adjust the date/time if the value was set from a CUC HEX string
+        if (mType == CUC && mDateTime.isValid())
         {
             qint64 diff = mEpoch.msecsTo(epoch);
             mDateTime = mDateTime.addMSecs(diff);