mirror of
https://github.com/DreamSourceLab/DSView.git
synced 2025-01-13 13:32:53 +08:00
remove: load the device first time not by timer
This commit is contained in:
parent
8b593d6d99
commit
e912734c80
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -244,7 +244,6 @@ private:
|
||||
|
||||
int _key_value;
|
||||
bool _key_vaild;
|
||||
QTimer _load_device_timer;
|
||||
};
|
||||
|
||||
} // namespace pv
|
||||
|
Loading…
x
Reference in New Issue
Block a user