2
0
forked from Ivasoft/DSView

Cancel automatic switching device

This commit is contained in:
dreamsourcelabTAI
2023-02-20 19:08:26 +08:00
parent bc0684b57a
commit fd7aaa2d86
3 changed files with 28 additions and 9 deletions

View File

@@ -1664,16 +1664,27 @@ namespace pv
break;
case DSV_MSG_NEW_USB_DEVICE:
if (confirm_to_store_data())
{
_is_auto_switch_device = true;
on_save();
}
else
{
_session->set_default_device();
check_usb_device_speed();
}
if (_session->get_device()->is_demo() == false)
{
QString msgText = L_S(STR_PAGE_MSG, S_ID(IDS_MSG_TO_SWITCH_DEVICE), "To switch the new device?");
if (MsgBox::Confirm(msgText) == false){
_sampling_bar->update_device_list(); // Update the list only.
return;
}
}
if (confirm_to_store_data())
{
_is_auto_switch_device = true;
on_save();
}
else
{
_session->set_default_device();
check_usb_device_speed();
}
}
break;
case DSV_MSG_CURRENT_DEVICE_DETACHED:

View File

@@ -354,5 +354,9 @@
{
"id": "IDS_MSG_NO_DATA",
"text": "没有数据!"
},
{
"id": "IDS_MSG_TO_SWITCH_DEVICE",
"text": "要切换到新设备?"
}
]

View File

@@ -355,5 +355,9 @@
{
"id": "IDS_MSG_NO_DATA",
"text": "Have no data!"
},
{
"id": "IDS_MSG_TO_SWITCH_DEVICE",
"text": "To switch the new device?"
}
]