remove: load the device first time not by timer

This commit is contained in:
dreamsourcelabTAI 2024-04-23 14:27:12 +08:00
parent 8b593d6d99
commit e912734c80
2 changed files with 7 additions and 15 deletions

View File

@ -317,24 +317,17 @@ namespace pv
}
}
// Load the device after the view is ready.
connect(&_load_device_timer, SIGNAL(timeout()), this, SLOT(on_load_device_first()));
_load_device_timer.start(100);
on_load_device_first();
}
void MainWindow::on_load_device_first()
{
if (_view->view_is_ready())
{
if (tmp_file != ""){
on_load_file(tmp_file);
tmp_file = "";
}
else{
_session->set_default_device();
}
_load_device_timer.stop();
if (tmp_file != ""){
on_load_file(tmp_file);
tmp_file = "";
}
else{
_session->set_default_device();
}
}

View File

@ -244,7 +244,6 @@ private:
int _key_value;
bool _key_vaild;
QTimer _load_device_timer;
};
} // namespace pv