2
0
forked from Ivasoft/DSView

fix: fix: Switching to a new device without stopping the current device

This commit is contained in:
dreamsourcelabTAI
2023-05-09 16:18:24 +08:00
parent 80e3e01d89
commit c56765b873
3 changed files with 14 additions and 3 deletions

View File

@@ -1518,6 +1518,10 @@ namespace pv
{
dsv_info("The data save confirm end, auto switch to the new device.");
_is_auto_switch_device = false;
if (_session->is_working())
_session->stop_capture();
_session->set_default_device();
}
}
@@ -1855,10 +1859,17 @@ namespace pv
if (confirm_to_store_data())
{
_is_auto_switch_device = true;
if (_session->is_working())
_session->stop_capture();
on_save();
}
else
{
{
if (_session->is_working())
_session->stop_capture();
_session->set_default_device();
}
}

View File

@@ -177,7 +177,7 @@ namespace pv
assert(!_is_saving);
if (_is_working){
dsv_info("The current device is working, now to stop it.");
dsv_info("SigSession::set_default_device()The current device is working, now to stop it.");
dsv_info("SigSession::set_default_device(), stop capture");
stop_capture();
}

View File

@@ -201,7 +201,7 @@ void Header::mousePressEvent(QMouseEvent *event)
for(auto t : traces){
if (t->signal_type() == LOGIC_SIGNAL && _view.session().is_working()){
// Disable to set trigger when capturing.
// Disable set trigger from left pannel when capturing.
break;
}
if (t->mouse_press(width(), event->pos()))