forked from Ivasoft/DSView
Cancel automatic switching device
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -354,5 +354,9 @@
|
||||
{
|
||||
"id": "IDS_MSG_NO_DATA",
|
||||
"text": "没有数据!"
|
||||
},
|
||||
{
|
||||
"id": "IDS_MSG_TO_SWITCH_DEVICE",
|
||||
"text": "要切换到新设备?"
|
||||
}
|
||||
]
|
||||
@@ -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?"
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user