mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Rendering improvements
This commit is contained in:
1 parent
804aff1e00
commit
cd8661f75a
11 files changed
+71
-99
No files matched your search
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
@@ -81,8 +82,15 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization
|
||||
|
||||
private void ApplySurfaceConfiguration(ArtemisSurface surface)
|
||||
{
|
||||
List<ArtemisDevice> devices;
|
||||
lock (Devices)
|
||||
{
|
||||
devices = new List<ArtemisDevice>();
|
||||
devices.AddRange(surface.Devices);
|
||||
}
|
||||
|
||||
// Make sure all devices have an up-to-date VM
|
||||
foreach (var surfaceDeviceConfiguration in surface.Devices)
|
||||
foreach (var surfaceDeviceConfiguration in devices)
|
||||
{
|
||||
// Create VMs for missing devices
|
||||
var viewModel = Devices.FirstOrDefault(vm => vm.Device.RgbDevice == surfaceDeviceConfiguration.RgbDevice);
|
||||
@@ -104,7 +112,7 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization
|
||||
else
|
||||
viewModel.Device = surfaceDeviceConfiguration;
|
||||
}
|
||||
|
||||
|
||||
// Sort the devices by ZIndex
|
||||
Execute.PostToUIThread(() =>
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user