/** * <summary>Finds the location of the sublayers object in the default configuration; in case no * sublayers object is associated to this object, its virtual position is indicated.</summary> */ private LayersLocation FindLayersLocation( ) { LayersLocation location = FindLayersLocation(DefaultConfiguration); if (location == null) { /* * NOTE: In case the layer is outside the default structure, it's appended to the root * collection. */ /* * TODO: anytime a layer is inserted into a collection, the layer tree must be checked to * avoid duplicate: in case the layer is already in the tree, it must be moved to the new * position along with its sublayers. */ Layers rootLayers = DefaultConfiguration.Layers; rootLayers.Add(this); location = new LayersLocation(null, rootLayers.BaseDataObject, rootLayers.Count, new Stack <Object[]>()); } return(location); }
/** <summary>Finds the location of the sublayers object in the default configuration; in case no sublayers object is associated to this object, its virtual position is indicated.</summary> */ private LayersLocation FindLayersLocation( ) { LayersLocation location = FindLayersLocation(DefaultConfiguration); if(location == null) { /* NOTE: In case the layer is outside the default structure, it's appended to the root collection. */ /* TODO: anytime a layer is inserted into a collection, the layer tree must be checked to avoid duplicate: in case the layer is already in the tree, it must be moved to the new position along with its sublayers. */ Layers rootLayers = DefaultConfiguration.Layers; rootLayers.Add(this); location = new LayersLocation(null, rootLayers.BaseDataObject, rootLayers.Count, new Stack<Object[]>()); } return location; }