diff --git a/sources/editor/Stride.Core.Assets.Editor/Components/Properties/PropertiesViewModel.cs b/sources/editor/Stride.Core.Assets.Editor/Components/Properties/PropertiesViewModel.cs index 9711ac747f..197b2354e6 100644 --- a/sources/editor/Stride.Core.Assets.Editor/Components/Properties/PropertiesViewModel.cs +++ b/sources/editor/Stride.Core.Assets.Editor/Components/Properties/PropertiesViewModel.cs @@ -117,24 +117,12 @@ public async Task GenerateSelectionPropertiesAsync(IEnumerable GenerateSelectionPropertiesAsync(IEnumerable ExpandSingleProperties(e.Container))); + + Dispatcher.VerifyAccess(); + ExpandSingleProperties(e.Container); } private PropertyViewItem GetPropertyItem(string propertyPath) diff --git a/sources/editor/Stride.GameStudio/View/GameStudioWindow.xaml b/sources/editor/Stride.GameStudio/View/GameStudioWindow.xaml index 9bd797f2e1..882c3b4d1a 100644 --- a/sources/editor/Stride.GameStudio/View/GameStudioWindow.xaml +++ b/sources/editor/Stride.GameStudio/View/GameStudioWindow.xaml @@ -757,8 +757,6 @@ - @@ -875,6 +873,8 @@ + + diff --git a/sources/presentation/Stride.Core.Presentation.Wpf/Controls/TreeView.cs b/sources/presentation/Stride.Core.Presentation.Wpf/Controls/TreeView.cs index 54558f84d7..aa3d531933 100644 --- a/sources/presentation/Stride.Core.Presentation.Wpf/Controls/TreeView.cs +++ b/sources/presentation/Stride.Core.Presentation.Wpf/Controls/TreeView.cs @@ -794,13 +794,15 @@ private void ModifySelection([NotNull] ICollection itemsToSelect, [NotNu return; allowedSelectionChanges = true; - // Unselect and then select items + + // Select and then unselect items to make sure we don't present an empty property grid while it's loading + ((NonGenericObservableListWrapper)SelectedItems).AddRange(itemsToSelect); + foreach (var itemToUnSelect in itemsToUnselect) { SelectedItems.Remove(itemToUnSelect); } - ((NonGenericObservableListWrapper)SelectedItems).AddRange(itemsToSelect); allowedSelectionChanges = false; if (itemsToUnselect.Contains(lastShiftRoot))