public bool RemoveLink(SOLink link) { bool bFound = Links.Remove(link); if (bFound) { if (link.Name != null && NamedLinks.ContainsKey(link.Name)) { NamedLinks.Remove(link.Name); } // We might be running this *in* a ChangeOp, in which case we // do not want to push another one. ugly problem =\ if (Scene.History.InPastState) { link.Unlink(); } else { IChangeOp change = link.GetRemoveChange(); if (change == null) { // we cannot undo this link removal link.Unlink(); } else { Scene.History.PushChange(change, false); } } } return(bFound); }
/// <summary> /// Remove link /// </summary> public bool RemoveLink(SOLink link) { bool bFound = Links.Remove(link); if (bFound) { if (link.Name != null && NamedLinks.ContainsKey(link.Name)) { NamedLinks.Remove(link.Name); } link.Unlink(); } return(bFound); }