CA-224724: VBD edit page: show 'position in use' message on the dropdown items

requested changed by code review

Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
This commit is contained in:
Gabor Apati-Nagy 2017-06-28 13:36:32 +01:00 committed by Konstantina Chremmou
parent 33c95f5e6f
commit c0edd4c587

View File

@ -158,23 +158,15 @@ namespace XenAdmin.SettingsPanels
if (comboBoxItemWithVdi != null)
{
devicePositionComboBox.Items.Add(comboBoxItemWithVdi);
if (vbd != null && comboBoxItemWithVdi.VBD.userdevice == vbd.userdevice)
devicePositionComboBox.SelectedItem = comboBoxItemWithVdi;
}
else
{
devicePositionComboBox.Items.Add(new DevicePositionComboBoxItem(devicePosition));
}
}
// Make sure the userdevice for the selected VBD is the one selected in the combobox
foreach (DevicePositionComboBoxItem item in devicePositionComboBox.Items)
{
if (item.VBD != null && item.VBD.userdevice == vbd.userdevice)
{
devicePositionComboBox.SelectedItem = item;
break;
}
}
}
finally
{