forked from Ivasoft/DSView
fix: fix: Switching to a new device without stopping the current device
This commit is contained in:
@@ -1518,6 +1518,10 @@ namespace pv
|
|||||||
{
|
{
|
||||||
dsv_info("The data save confirm end, auto switch to the new device.");
|
dsv_info("The data save confirm end, auto switch to the new device.");
|
||||||
_is_auto_switch_device = false;
|
_is_auto_switch_device = false;
|
||||||
|
|
||||||
|
if (_session->is_working())
|
||||||
|
_session->stop_capture();
|
||||||
|
|
||||||
_session->set_default_device();
|
_session->set_default_device();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1855,10 +1859,17 @@ namespace pv
|
|||||||
if (confirm_to_store_data())
|
if (confirm_to_store_data())
|
||||||
{
|
{
|
||||||
_is_auto_switch_device = true;
|
_is_auto_switch_device = true;
|
||||||
|
|
||||||
|
if (_session->is_working())
|
||||||
|
_session->stop_capture();
|
||||||
|
|
||||||
on_save();
|
on_save();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if (_session->is_working())
|
||||||
|
_session->stop_capture();
|
||||||
|
|
||||||
_session->set_default_device();
|
_session->set_default_device();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -177,7 +177,7 @@ namespace pv
|
|||||||
assert(!_is_saving);
|
assert(!_is_saving);
|
||||||
|
|
||||||
if (_is_working){
|
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");
|
dsv_info("SigSession::set_default_device(), stop capture");
|
||||||
stop_capture();
|
stop_capture();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -201,7 +201,7 @@ void Header::mousePressEvent(QMouseEvent *event)
|
|||||||
|
|
||||||
for(auto t : traces){
|
for(auto t : traces){
|
||||||
if (t->signal_type() == LOGIC_SIGNAL && _view.session().is_working()){
|
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;
|
break;
|
||||||
}
|
}
|
||||||
if (t->mouse_press(width(), event->pos()))
|
if (t->mouse_press(width(), event->pos()))
|
||||||
|
|||||||
Reference in New Issue
Block a user