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

View File

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