Better processing of wireless link autojoin

This commit is contained in:
Tim Young 2018-05-02 12:47:01 -05:00
parent b94114da4b
commit d045738205
1 changed files with 6 additions and 1 deletions

View File

@ -215,7 +215,9 @@ namespace EduNetworkBuilder
if (NetComponents.Count != CompareTo.NetComponents.Count) return false;
for (int i = 0; i < NetComponents.Count; i++)
{
if (!NetComponents[i].Equals(CompareTo.NetComponents[i])) return false;
}
if (Shapes.Count != CompareTo.Shapes.Count) return false;
for (int i = 0; i < Shapes.Count; i++)
@ -2133,6 +2135,7 @@ namespace EduNetworkBuilder
{
didanything = true;
nl.Destroy(); //We will rebuild it later
NetComponents.RemoveAt(i);
}
}
}
@ -2159,6 +2162,8 @@ namespace EduNetworkBuilder
{
bool didanything = false;
NetworkDevice nd;
_isDirty = true;
DoAllRemoveAllWirelessLinks(); //Remove them before we re-join them all
foreach (NetworkComponent nc in NetComponents.ToList())
{
if (NB.GetComponentType(nc) == GeneralComponentType.device)
@ -2167,7 +2172,7 @@ namespace EduNetworkBuilder
didanything = nd.AutoJoinWireless() || didanything;
}
}
UpdateImage();
return didanything;
}