Made sure profiles use proper profile extension and are looked for accordingly
Fixed bug where we would show upload profile dialog without any profiles to upload
This commit is contained in:
parent
26269a64d5
commit
f8e00ca879
4 changed files with 9 additions and 3 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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(() =>
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue