mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-25 06:16:37 +01:00
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:
parent
a294c61bd0
commit
14aa3f3f5d
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user