CA-289335: Do not check the NetworkComboBoxItem can be selected unless it has been added to the ComboBox.

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
This commit is contained in:
Konstantina Chremmou 2018-06-06 15:15:22 +01:00 committed by Mihaela Stoica
parent a294c61bd0
commit 14aa3f3f5d

View File

@ -72,7 +72,12 @@ namespace XenAdmin.Controls
var item = CreateNewItem(pif);
AddItemToComboBox(item);
if (IncludeOnlyEnabledNetworksInComboBox && !item.NetworkIsConnected)
continue;
if (IncludeOnlyNetworksWithIPAddresses && !item.HasIPAddress)
continue;
Items.Add(item);
if (!found && matchSelectionCriteria(item))
{
@ -82,20 +87,6 @@ namespace XenAdmin.Controls
}
}
private void AddItemToComboBox(NetworkComboBoxItem item)
{
if( IncludeOnlyEnabledNetworksInComboBox && !item.NetworkIsConnected )
{
return;
}
if (IncludeOnlyNetworksWithIPAddresses && !item.HasIPAddress)
{
return;
}
Items.Add(item);
}
private NetworkComboBoxItem CreateNewItem(PIF pif)
{