diff --git a/MatterControlLib/ApplicationView/ApplicationController.cs b/MatterControlLib/ApplicationView/ApplicationController.cs index 118593fee..fc6aad2d4 100644 --- a/MatterControlLib/ApplicationView/ApplicationController.cs +++ b/MatterControlLib/ApplicationView/ApplicationController.cs @@ -553,7 +553,9 @@ namespace MatterHackers.MatterControl public static Func> GetPrinterProfileAsync; // Executes the user printer profile sync logic in the webservices plugin - public static Func, Task> SyncPrinterProfiles; + public static Func, Task> SyncCloudProfiles; + + public static Action QueueCloudProfileSync; // Returns all public printer profiles from the webservices plugin public static Func> GetPublicProfileList; diff --git a/MatterControlLib/SlicerConfiguration/Settings/ProfileManager.cs b/MatterControlLib/SlicerConfiguration/Settings/ProfileManager.cs index 1b405ad5d..6ec08a287 100644 --- a/MatterControlLib/SlicerConfiguration/Settings/ProfileManager.cs +++ b/MatterControlLib/SlicerConfiguration/Settings/ProfileManager.cs @@ -147,8 +147,8 @@ namespace MatterHackers.MatterControl.SlicerConfiguration // Notify listeners of a ProfileListChange event due to this printers removal ProfileManager.ProfilesListChanged.CallEvents(this, null); - // Force sync after marking for delete if assigned - ApplicationController.SyncPrinterProfiles?.Invoke("SettingsHelpers.SetMarkedForDelete()", null); + // Queue sync after marking printer for delete + ApplicationController.QueueCloudProfileSync?.Invoke("SettingsHelpers.SetMarkedForDelete()"); }); } @@ -691,8 +691,8 @@ namespace MatterHackers.MatterControl.SlicerConfiguration ProfilesListChanged.CallEvents(null, null); - // Force sync after any collection change event - ApplicationController.SyncPrinterProfiles?.Invoke("ProfileManager.Profiles_CollectionChanged()", null); + // Queue sync after any collection change event + ApplicationController.QueueCloudProfileSync?.Invoke("ProfileManager.Profiles_CollectionChanged()"); } private void Printer_SettingsChanged(object sender, StringEventArgs e)