[ui] fix Quick Format being disabled when no device is plugged

This commit is contained in:
Pete Batard 2020-02-15 14:40:05 +00:00
parent f1f6e4b4ea
commit 4ee90a9546
No known key found for this signature in database
GPG key ID: 38E0CF5E69EDD671
2 changed files with 9 additions and 7 deletions

View file

@ -778,9 +778,11 @@ static void EnableBootOptions(BOOL enable, BOOL remove_checkboxes)
{
BOOL actual_enable_bb, actual_enable = enable;
// If no device is selected, don't enable anything
if (ComboBox_GetCurSel(hDeviceList) < 0)
// If no device is selected, don't enable anything and also don't remove the checkboxes
if (ComboBox_GetCurSel(hDeviceList) < 0) {
actual_enable = FALSE;
remove_checkboxes = FALSE;
}
// If boot selection is set to image, but no image is currently selected, don't enable anything
if ((boot_type == BT_IMAGE) && (image_path == NULL))
actual_enable = FALSE;