Cancel the selected item when failed to active a device

This commit is contained in:
dreamsourcelabTAI 2023-05-10 14:36:51 +08:00
parent ab41a49df5
commit a9e580987c

View File

@ -1018,9 +1018,13 @@ namespace pv
} }
} }
_session->set_device(devHandle); if (_session->set_device(devHandle)){
_last_device_index = _device_selector.currentIndex(); _last_device_index = _device_selector.currentIndex();
} }
else{
update_device_list(); // Reload the list.
}
}
void SamplingBar::enable_toggle(bool enable) void SamplingBar::enable_toggle(bool enable)
{ {