diff --git a/src/Artemis.UI.Shared/Controls/DeviceVisualizer.cs b/src/Artemis.UI.Shared/Controls/DeviceVisualizer.cs index 2b16bb769..6908fadd3 100644 --- a/src/Artemis.UI.Shared/Controls/DeviceVisualizer.cs +++ b/src/Artemis.UI.Shared/Controls/DeviceVisualizer.cs @@ -197,9 +197,12 @@ public class DeviceVisualizer : Control private void DevicePropertyChanged(object? sender, PropertyChangedEventArgs e) { - if (Device != null) - BitmapCache.Remove(Device); - Dispatcher.UIThread.Invoke(SetupForDevice, DispatcherPriority.Background); + Dispatcher.UIThread.Invoke(async () => + { + if (Device != null) + BitmapCache.Remove(Device); + await SetupForDevice(); + }, DispatcherPriority.Background); } private void DeviceUpdated(object? sender, EventArgs e) diff --git a/src/Artemis.UI/Screens/SurfaceEditor/SurfaceEditorViewModel.cs b/src/Artemis.UI/Screens/SurfaceEditor/SurfaceEditorViewModel.cs index e68d8e13a..a6e28ea39 100644 --- a/src/Artemis.UI/Screens/SurfaceEditor/SurfaceEditorViewModel.cs +++ b/src/Artemis.UI/Screens/SurfaceEditor/SurfaceEditorViewModel.cs @@ -136,6 +136,10 @@ public class SurfaceEditorViewModel : ActivatableViewModelBase, IMainScreenViewM _saving = true; _rgbService.SaveDevices(); } + catch (Exception e) + { + _windowService.ShowExceptionDialog("Failed to update device positions", e); + } finally { _saving = false;