We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 26d57ff commit f0cb6ddCopy full SHA for f0cb6dd
src/qml/chainmodel.cpp
@@ -74,7 +74,14 @@ void ChainModel::setCurrentTimeRatio()
74
double current_time_ratio = double(secs_since_meridian) / SECS_IN_12_HOURS;
75
76
if (current_time_ratio < m_time_ratio_list[0].toDouble()) { // That means time has crossed a meridian
77
- m_time_ratio_list.erase(m_time_ratio_list.begin() + 2, m_time_ratio_list.end());
+ m_time_ratio_list.clear();
78
}
79
- m_time_ratio_list[0] = current_time_ratio;
+
80
+ if (m_time_ratio_list.isEmpty()) {
81
+ m_time_ratio_list.push_back(current_time_ratio);
82
+ m_time_ratio_list.push_back(0);
83
+ } else {
84
+ m_time_ratio_list[0] = current_time_ratio;
85
+ }
86
+ Q_EMIT timeRatioListChanged();
87
0 commit comments