1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-13 05:48:35 +00:00

Fixed LedMap not being updated

This commit is contained in:
Diogo Trindade 2021-09-04 19:56:45 +01:00
parent 0b370f261c
commit a501a44264
2 changed files with 3 additions and 2 deletions

View File

@ -114,7 +114,7 @@ namespace Artemis.Core.Modules
private readonly List<(DefaultCategoryName, string)> _defaultProfilePaths = new(); private readonly List<(DefaultCategoryName, string)> _defaultProfilePaths = new();
private readonly List<(DefaultCategoryName, string)> _pendingDefaultProfilePaths = new(); private readonly List<(DefaultCategoryName, string)> _pendingDefaultProfilePaths = new();
public Module() protected Module()
{ {
DefaultProfilePaths = new ReadOnlyCollection<(DefaultCategoryName, string)>(_defaultProfilePaths); DefaultProfilePaths = new ReadOnlyCollection<(DefaultCategoryName, string)>(_defaultProfilePaths);
HiddenProperties = new(HiddenPropertiesList); HiddenProperties = new(HiddenPropertiesList);

View File

@ -89,6 +89,7 @@ namespace Artemis.Core.Services
try try
{ {
_ledMap = new Dictionary<Led, ArtemisLed>(_devices.SelectMany(d => d.Leds).ToDictionary(l => l.RgbLed)); _ledMap = new Dictionary<Led, ArtemisLed>(_devices.SelectMany(d => d.Leds).ToDictionary(l => l.RgbLed));
LedMap = new ReadOnlyDictionary<Led, ArtemisLed>(_ledMap);
if (_surfaceLedGroup == null) if (_surfaceLedGroup == null)
{ {
@ -138,7 +139,7 @@ namespace Artemis.Core.Services
public IReadOnlyCollection<ArtemisDevice> EnabledDevices { get; } public IReadOnlyCollection<ArtemisDevice> EnabledDevices { get; }
public IReadOnlyCollection<ArtemisDevice> Devices { get; } public IReadOnlyCollection<ArtemisDevice> Devices { get; }
public IReadOnlyDictionary<Led, ArtemisLed> LedMap { get; } public IReadOnlyDictionary<Led, ArtemisLed> LedMap { get; private set; }
public RGBSurface Surface { get; set; } public RGBSurface Surface { get; set; }
public bool IsRenderPaused { get; set; } public bool IsRenderPaused { get; set; }