mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +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
@ -196,10 +196,13 @@ public class DeviceVisualizer : Control
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void DevicePropertyChanged(object? sender, PropertyChangedEventArgs e)
|
private void DevicePropertyChanged(object? sender, PropertyChangedEventArgs e)
|
||||||
|
{
|
||||||
|
Dispatcher.UIThread.Invoke(async () =>
|
||||||
{
|
{
|
||||||
if (Device != null)
|
if (Device != null)
|
||||||
BitmapCache.Remove(Device);
|
BitmapCache.Remove(Device);
|
||||||
Dispatcher.UIThread.Invoke(SetupForDevice, DispatcherPriority.Background);
|
await SetupForDevice();
|
||||||
|
}, DispatcherPriority.Background);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DeviceUpdated(object? sender, EventArgs e)
|
private void DeviceUpdated(object? sender, EventArgs e)
|
||||||
|
|||||||
@ -136,6 +136,10 @@ public class SurfaceEditorViewModel : ActivatableViewModelBase, IMainScreenViewM
|
|||||||
_saving = true;
|
_saving = true;
|
||||||
_rgbService.SaveDevices();
|
_rgbService.SaveDevices();
|
||||||
}
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
_windowService.ShowExceptionDialog("Failed to update device positions", e);
|
||||||
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
_saving = false;
|
_saving = false;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user