private void EditorStateHandler(object sender, PropertyChangedEventArgs e)
{
if (e.PropertyName != "SelectedProfile")
return;
// Update editor enabled state
NotifyOfPropertyChange(() => EditorEnabled);
// Update ProfileViewModel
ProfileViewModel.SelectedProfile = SelectedProfile;
// Update interface
Layers.Clear();
if (SelectedProfile != null)
Layers.AddRange(SelectedProfile.Layers);
NotifyOfPropertyChange(() => ProfileSelected);
}