mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-12 13:28:33 +00:00
Device visualizer - Clear device cache on UI thread on property change
Surface editor - Don't quietly fail device updates
This commit is contained in:
parent
850038ffd1
commit
af1920141c
@ -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)
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user