SR wizard/iSCSI target/Select LUN selector: if there is one result only, this item is selected automatically

This commit is contained in:
Gabor Apati-Nagy 2013-10-16 11:12:00 +01:00
parent 17dbdc8300
commit dc0460ddc8

View File

@ -670,7 +670,7 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages.Frontends
comboBoxIscsiLuns.Items.Add(label); comboBoxIscsiLuns.Items.Add(label);
LunMap.Add(label, i); LunMap.Add(label, i);
} }
comboBoxIscsiLuns.SelectedItem = Messages.SELECT_TARGET_LUN; comboBoxIscsiLuns.SelectedItem = comboBoxIscsiLuns.Items.Count == 2 ? comboBoxIscsiLuns.Items[1] : Messages.SELECT_TARGET_LUN; //if there is only one choice, select that one by default
comboBoxIscsiLuns.Enabled = true; comboBoxIscsiLuns.Enabled = true;
targetLunLabel.Enabled = true; targetLunLabel.Enabled = true;
comboBoxIscsiLuns.Focus(); comboBoxIscsiLuns.Focus();