X-Git-Url: https://vaikene.ee/gitweb/pswgen09.html?a=blobdiff_plain;ds=inline;f=src%2Fapps%2FScosTime%2Fgui.cpp;h=d0476136e5360a8f0f7c0ba229b10de682ecdb3f;hb=38c2779e95311f1d9dac4a9d9469b0489b395333;hp=ed7f09841dbc2f0d0a729d50aa22b8e3490be1ee;hpb=66f5040b87e8071012efbc928a4f28f8bdd615b1;p=evaf
diff --git a/src/apps/ScosTime/gui.cpp b/src/apps/ScosTime/gui.cpp
index ed7f098..d047613 100644
--- a/src/apps/ScosTime/gui.cpp
+++ b/src/apps/ScosTime/gui.cpp
@@ -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);
@@ -429,7 +430,7 @@ void Module::dateTimeEdited(QString const & s)
wConvertDateTime->setEnabled(true);
wConvertDateTime->setText(tr("&to ASD", VER_MODULE_NAME_STR));
}
- else if (mDateTime.type() == Internal::DateTime::ISO)
+ else if (mDateTime.type() == Internal::DateTime::ASD)
{
wConvertDateTime->setEnabled(true);
wConvertDateTime->setText(tr("&to ISO", VER_MODULE_NAME_STR));