@@ -161,8 +161,8 QVariant VariableModel::data(const QModelIndex &index, int role) const | |||||
161 | dataSeries->lockRead(); |
|
161 | dataSeries->lockRead(); | |
162 | auto it = getValueFun(*dataSeries); |
|
162 | auto it = getValueFun(*dataSeries); | |
163 | auto resVariant = (it != dataSeries->cend()) |
|
163 | auto resVariant = (it != dataSeries->cend()) | |
164 | ? DateUtils::dateTime(it->x()).toString(DATETIME_FORMAT) |
|
164 | ? DateUtils::dateTime(it->x()).toString(DATETIME_FORMAT) | |
165 | : QVariant{}; |
|
165 | : QVariant{}; | |
166 | dataSeries->unlock(); |
|
166 | dataSeries->unlock(); | |
167 | return resVariant; |
|
167 | return resVariant; | |
168 | } |
|
168 | } |
@@ -193,7 +193,8 VisualizationGraphWidget *VisualizationZoneWidget::createGraph(std::shared_ptr<V | |||||
193 | // get y using variable range |
|
193 | // get y using variable range | |
194 | if (auto dataSeries = variable->dataSeries()) { |
|
194 | if (auto dataSeries = variable->dataSeries()) { | |
195 | dataSeries->lockRead(); |
|
195 | dataSeries->lockRead(); | |
196 | auto valuesBounds = dataSeries->valuesBounds(variable->range().m_TStart, variable->range().m_TEnd); |
|
196 | auto valuesBounds | |
|
197 | = dataSeries->valuesBounds(variable->range().m_TStart, variable->range().m_TEnd); | |||
197 | auto end = dataSeries->cend(); |
|
198 | auto end = dataSeries->cend(); | |
198 | if (valuesBounds.first != end && valuesBounds.second != end) { |
|
199 | if (valuesBounds.first != end && valuesBounds.second != end) { | |
199 | auto rangeValue = [](const auto &value) { return std::isnan(value) ? 0. : value; }; |
|
200 | auto rangeValue = [](const auto &value) { return std::isnan(value) ? 0. : value; }; |
General Comments 0
You need to be logged in to leave comments.
Login now