From 21828fc6f476ed1fda442a2bc966d0b20662d5d7 Mon Sep 17 00:00:00 2001 From: dreamsourcelabTAI Date: Sat, 17 Jun 2023 12:08:38 +0800 Subject: [PATCH] fix: Failed to switch device while saving the data --- DSView/pv/mainwindow.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/DSView/pv/mainwindow.cpp b/DSView/pv/mainwindow.cpp index cdbc3dbd..effad38c 100644 --- a/DSView/pv/mainwindow.cpp +++ b/DSView/pv/mainwindow.cpp @@ -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();