From 81a269522c66c774afdb2b52a6fec5a51ffc6945 Mon Sep 17 00:00:00 2001 From: Konstantina Chremmou Date: Wed, 1 Nov 2023 01:17:52 +0000 Subject: [PATCH] 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 --- XenAdmin/ConsoleView/VNCTabView.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/XenAdmin/ConsoleView/VNCTabView.cs b/XenAdmin/ConsoleView/VNCTabView.cs index bb3314f8c..7a3e97b61 100644 --- a/XenAdmin/ConsoleView/VNCTabView.cs +++ b/XenAdmin/ConsoleView/VNCTabView.cs @@ -1291,10 +1291,12 @@ internal void VMPowerOff() { toggleConsoleButton.Enabled = false; - VBD cddrive = source.FindVMCDROM(); - bool allowEject = cddrive != null ? cddrive.allowed_operations.Contains(vbd_operations.eject) : false; - bool allowInsert = cddrive != null ? cddrive.allowed_operations.Contains(vbd_operations.insert) : false; - multipleDvdIsoList1.Enabled = (source.power_state == vm_power_state.Halted) && (allowEject || allowInsert); + VBD cdDrive = source.FindVMCDROM(); + + multipleDvdIsoList1.Enabled = cdDrive == null || + source.power_state == vm_power_state.Halted && + (cdDrive.allowed_operations.Contains(vbd_operations.eject) || + cdDrive.allowed_operations.Contains(vbd_operations.insert)); sendCAD.Enabled = false; }