Made SurfaceService solely responsible for keeping the surface and the config in sync and saved

This commit is contained in:
Robert Beekman committed 2019-10-24 00:05:36 +02:00
1 parent 9badc666e8
commit 3dc8fa6b1c
5 files changed
+85 -89

No files matched your search

@@ -70,7 +70,7 @@ namespace Artemis.UI.ViewModels.Screens
if (activeConfig == null)
{
activeConfig = AddSurfaceConfiguration("Default");
_surfaceService.ActiveSurfaceConfiguration = activeConfig;
_surfaceService.SetActiveSurfaceConfiguration(activeConfig);
}
Execute.OnUIThread(() =>
@@ -106,7 +106,7 @@ namespace Artemis.UI.ViewModels.Screens
});
});
_surfaceService.ActiveSurfaceConfiguration = SelectedSurfaceConfiguration;
_surfaceService.SetActiveSurfaceConfiguration(SelectedSurfaceConfiguration);
}
#region Overrides of Screen
@@ -275,9 +275,7 @@ namespace Artemis.UI.ViewModels.Screens
}
else
{
foreach (var device in Devices)
device.DeviceConfiguration.ApplyToDevice();
_surfaceService.SaveToRepository(SelectedSurfaceConfiguration, true);
_surfaceService.UpdateSurfaceConfiguration(SelectedSurfaceConfiguration, true);
}
Mouse.OverrideCursor = null;