From ffc280da73673f08cd03040f278d09d02b9bc088 Mon Sep 17 00:00:00 2001 From: Matt Moening Date: Tue, 26 Jul 2016 10:42:40 -0700 Subject: [PATCH] Fixed bug where would try to write to a OemProfile Twice throwing an exception - Removed ReloadOemProfiles form on load (ReloadOemProfiles is called in sync and sync is called on start up so two calls were going out at once) - DownloadMissingProfiles is no longer a separate task so that we don't resync and try to run a second download of missing profiles --- SettingsManagement/OemSettings.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/SettingsManagement/OemSettings.cs b/SettingsManagement/OemSettings.cs index 45f9f196d..fe8383f33 100644 --- a/SettingsManagement/OemSettings.cs +++ b/SettingsManagement/OemSettings.cs @@ -132,8 +132,6 @@ namespace MatterHackers.MatterControl.SettingsManagement var manufacturesList = OemProfiles.Keys.ToDictionary(oem => oem).ToList(); SetManufacturers(manufacturesList); - - ApplicationController.Load += (s,e) => ReloadOemProfiles(); } public async Task ReloadOemProfiles() @@ -157,7 +155,7 @@ namespace MatterHackers.MatterControl.SettingsManagement var manufactures = oemProfiles.Keys.ToDictionary(oem => oem); SetManufacturers(manufactures); - Task.Run((Action)DownloadMissingProfiles); + DownloadMissingProfiles(); } }