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;
});
}