Artemis.ViewModels.Profiles.ProfileEditorViewModel.UpdateLayerList C# (CSharp) Method

UpdateLayerList() private method

private UpdateLayerList ( LayerModel selectModel ) : void
selectModel LayerModel
return void
        private void UpdateLayerList(LayerModel selectModel)
        {
            // Update the UI
            Layers.Clear();
            ProfileViewModel.SelectedLayer = null;

            if (SelectedProfile != null)
                Layers.AddRange(SelectedProfile.Layers);

            if (selectModel == null)
                return;

            // A small delay to allow the profile list to rebuild
            Task.Factory.StartNew(() =>
            {
                Thread.Sleep(100);
                ProfileViewModel.SelectedLayer = selectModel;
            });
        }