2
0
forked from Ivasoft/DSView

fix: Failed to switch device while saving the data

This commit is contained in:
dreamsourcelabTAI
2023-06-17 12:08:38 +08:00
parent 3226adfc7d
commit 21828fc6f4

View File

@@ -1948,10 +1948,17 @@ namespace pv
// The store confirm is not processed.
if (_is_save_confirm_msg){
dsv_info("New device attached:Waitting for the confirm box be closed.");
_is_auto_switch_device = true;
return;
}
if (_session->is_saving()){
dsv_info("New device attached:Waitting for store the data. and will switch to new device.");
_is_auto_switch_device = true;
return;
}
int mode = _device_agent->get_work_mode();
if (mode != DSO && confirm_to_store_data())
@@ -1984,6 +1991,12 @@ namespace pv
save_config();
_view->hide_calibration();
if (_session->is_saving()){
dsv_info("Device detached:Waitting for store the data. and will switch to new device.");
_is_auto_switch_device = true;
return;
}
if (confirm_to_store_data()){
_is_auto_switch_device = true;
on_save();