private List <LayerModel> GetLayers() { if (SelectedLayer == null) { return(new List <LayerModel>()); } lock (SelectedLayer) { // Get the layers that must be drawn List <LayerModel> drawLayers; if (ShowAll) { drawLayers = SelectedProfile.GetLayers(); } else if (SelectedLayer.LayerType is FolderType) { drawLayers = SelectedLayer.GetLayers().ToList(); } else { drawLayers = new List <LayerModel> { SelectedLayer } }; return(drawLayers); } } #endregion }
private List <LayerModel> GetLayers() { if (ShowAll) { return(SelectedProfile.GetLayers()); } if (SelectedLayer == null) { return(new List <LayerModel>()); } lock (SelectedLayer) { // Get the layers that must be drawn if (SelectedLayer.LayerType is FolderType) { return(SelectedLayer.GetLayers().ToList()); } return(new List <LayerModel> { SelectedLayer }); } }