diff --git a/sleepyhead/SleepLib/session.cpp b/sleepyhead/SleepLib/session.cpp index f3762cf5..5d424baf 100644 --- a/sleepyhead/SleepLib/session.cpp +++ b/sleepyhead/SleepLib/session.cpp @@ -282,12 +282,20 @@ bool Session::LoadSummary(QString filename) settings[code] = i.value(); } - QHash zcnt; - in >> zcnt; - - for (QHash::iterator i = zcnt.begin(); i != zcnt.end(); i++) { - code = schema::channel[i.key()].id(); - m_cnt[code] = i.value(); + if (version < 13) { + QHash zcnt; + in >> zcnt; + for (QHash::iterator i = zcnt.begin(); i != zcnt.end(); i++) { + code = schema::channel[i.key()].id(); + m_cnt[code] = i.value(); + } + } else { + QHash zcnt; + in >> zcnt; + for (QHash::iterator i = zcnt.begin(); i != zcnt.end(); i++) { + code = schema::channel[i.key()].id(); + m_cnt[code] = i.value(); + } } QHash zsum; @@ -295,7 +303,7 @@ bool Session::LoadSummary(QString filename) for (QHash::iterator i = zsum.begin(); i != zsum.end(); i++) { code = schema::channel[i.key()].id(); - m_cnt[code] = i.value(); + m_sum[code] = i.value(); } QHash ztmp;