diff --git a/ApplicationView/AdvancedControlsPanel.cs b/ApplicationView/AdvancedControlsPanel.cs index 5c3a0497f..8fe04e5c8 100644 --- a/ApplicationView/AdvancedControlsPanel.cs +++ b/ApplicationView/AdvancedControlsPanel.cs @@ -67,6 +67,10 @@ namespace MatterHackers.MatterControl public void ReloadSliceSettings() { WidescreenPanel.PreChangePanels.CallEvents(null, null); + if (advancedTab.HasBeenClosed) + { + return; + } // remove the advance control and replace it with new ones built for the selected printer int advancedControlsIndex = GetChildIndex(advancedTab); diff --git a/ApplicationView/MainApplicationWidget.cs b/ApplicationView/MainApplicationWidget.cs index 7e02bbd67..4e2100fc5 100644 --- a/ApplicationView/MainApplicationWidget.cs +++ b/ApplicationView/MainApplicationWidget.cs @@ -370,8 +370,10 @@ namespace MatterHackers.MatterControl // Ensure SQLite printers are imported profileManager.EnsurePrintersImported(); + var guestDB = ProfileManager.LoadGuestDB(); + // If profiles.json was created, run the import wizard to pull in any SQLite printers - if (!profileManager.IsGuestProfile && !profileManager.PrintersImported) + if (guestDB?.Profiles != null && guestDB.Profiles.Any() && !profileManager.IsGuestProfile && !profileManager.PrintersImported) { var wizardPage = new CopyGuestProfilesToUser(() => { diff --git a/SlicerConfiguration/Settings/ProfileManager.cs b/SlicerConfiguration/Settings/ProfileManager.cs index 8fabed8e9..e1d988c30 100644 --- a/SlicerConfiguration/Settings/ProfileManager.cs +++ b/SlicerConfiguration/Settings/ProfileManager.cs @@ -233,7 +233,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration return ActiveSliceSettings.Instance; } - string profilePath = Path.Combine(ProfilesPath, profileID + ".json"); + string profilePath = Path.Combine(ProfilesPath, profileID + ProfileManager.ProfileExtension); return File.Exists(profilePath) ? LoadProfileFromDisk(profilePath) : null; } diff --git a/SlicerConfiguration/Settings/ProfileMigrations.cs b/SlicerConfiguration/Settings/ProfileMigrations.cs index 3c280c979..556230388 100644 --- a/SlicerConfiguration/Settings/ProfileMigrations.cs +++ b/SlicerConfiguration/Settings/ProfileMigrations.cs @@ -92,7 +92,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration jObject["DocumentVersion"] = 201605132; File.Delete(filePath); - filePath = Path.Combine(Path.GetDirectoryName(filePath), printerID + ".json"); + filePath = Path.Combine(Path.GetDirectoryName(filePath), printerID + ProfileManager.ProfileExtension); } if (fromVersion < 201606081)