fix: Can't reset measure on bottom from file

This commit is contained in:
dreamsourcelabTAI 2023-06-17 17:48:29 +08:00
parent 3d3fdec1ab
commit 4bdc0809d6

View File

@ -260,11 +260,16 @@ QJsonArray ViewStatus::get_session()
void ViewStatus::load_session(QJsonArray measure_array)
{
if (_session->get_device()->get_work_mode() != DSO ||
measure_array.empty()){
if (_session->get_device()->get_work_mode() != DSO){
return;
}
for(int i = 0; i < (int)_mrects.size(); i++)
{
std::get<1>(_mrects[i]) = -1;
std::get<2>(_mrects[i]) = DSO_MS_BEGIN;
}
for (const QJsonValue &measure_value : measure_array) {
QJsonObject m_obj = measure_value.toObject();
int index = m_obj["site"].toInt();