Merge pull request #1246 from jlewin/master
Skip migrations if DocumentVersion missing
This commit is contained in:
commit
79d3686bca
2 changed files with 3 additions and 1 deletions
|
|
@ -266,7 +266,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
}
|
||||
}
|
||||
|
||||
int documentVersion = jObject?.GetValue("DocumentVersion")?.Value<int>() ?? 0;
|
||||
int documentVersion = jObject?.GetValue("DocumentVersion")?.Value<int>() ?? PrinterSettings.LatestVersion;
|
||||
if (documentVersion < PrinterSettings.LatestVersion)
|
||||
{
|
||||
printerProfilePath = ProfileMigrations.MigrateDocument(printerProfilePath, documentVersion);
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
{
|
||||
var jObject = JObject.Parse(File.ReadAllText(filePath));
|
||||
|
||||
/*
|
||||
if (fromVersion < 201605131)
|
||||
{
|
||||
var materialLayers = jObject["MaterialLayers"] as JObject;
|
||||
|
|
@ -94,6 +95,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
File.Delete(filePath);
|
||||
filePath = Path.Combine(Path.GetDirectoryName(filePath), printerID + ProfileManager.ProfileExtension);
|
||||
}
|
||||
*/
|
||||
|
||||
if (fromVersion < 201606081)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue