Skip to content

Commit e28aa63

Browse files
Konstantina ChremmouKonstantina Chremmou
authored andcommitted
The user could not create DVD from the Console TabPage while the same operation was possible from the VmStorage TabPage.
Signed-off-by: Konstantina Chremmou <[email protected]>
1 parent 6f1daff commit e28aa63

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

XenAdmin/ConsoleView/VNCTabView.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1291,10 +1291,12 @@ internal void VMPowerOff()
12911291
{
12921292
toggleConsoleButton.Enabled = false;
12931293

1294-
VBD cddrive = source.FindVMCDROM();
1295-
bool allowEject = cddrive != null ? cddrive.allowed_operations.Contains(vbd_operations.eject) : false;
1296-
bool allowInsert = cddrive != null ? cddrive.allowed_operations.Contains(vbd_operations.insert) : false;
1297-
multipleDvdIsoList1.Enabled = (source.power_state == vm_power_state.Halted) && (allowEject || allowInsert);
1294+
VBD cdDrive = source.FindVMCDROM();
1295+
1296+
multipleDvdIsoList1.Enabled = cdDrive == null ||
1297+
source.power_state == vm_power_state.Halted &&
1298+
(cdDrive.allowed_operations.Contains(vbd_operations.eject) ||
1299+
cdDrive.allowed_operations.Contains(vbd_operations.insert));
12981300

12991301
sendCAD.Enabled = false;
13001302
}

0 commit comments

Comments
 (0)