/// <summary> /// Remove an AnchoredTag from a Layer, so we recompute the presence of this AnchoredTag on that Layer /// </summary> /// <param name="anchoredTag">The anchored tag.</param> /// <exception cref="System.NotImplementedException"></exception> internal void RemoveMe(AnchoredTag anchor) { if (anchor.Link.IsDead()) { return; } var nbLinksOfThatTagOnThatLayer = 0; var layer = (anchor.Link as LayerLink).Layer; foreach (var component in layer.Components) { if (component.GetType() == typeof(AnchoredTag) && (component as AnchoredTag).Tag == this) { nbLinksOfThatTagOnThatLayer++; } } if (nbLinksOfThatTagOnThatLayer == 0) { ConcernedLayers.Remove(layer); } }
/// <summary> /// Removes the layer. (internal as it only should be called by the AnchoredTag) /// </summary> /// <param name="l">The layer.</param> internal void RemoveLayer(AbstractLayer l) { ConcernedLayers.Remove(l); }