Fix exception during load, initialize Printer after setting AssetsPath

This commit is contained in:
John Lewin 2017-09-15 23:13:23 -07:00
parent 0855e6c044
commit a14ffaca86

View file

@ -98,6 +98,8 @@ namespace MatterHackers.MatterControl
{
this.printItem = loadedItem;
}
this.Scene.Load(firstFile.FullName);
}
catch { }
}
@ -125,7 +127,6 @@ namespace MatterHackers.MatterControl
ApplicationController.Instance.ActiveView3DWidget?.PartHasBeenChanged();
}
private GCodeFile loadedGCode;
public GCodeFile LoadedGCode
{
@ -520,7 +521,7 @@ namespace MatterHackers.MatterControl
{
public ThemeConfig Theme { get; set; } = new ThemeConfig();
public PrinterConfig Printer { get; } = new PrinterConfig(loadLastBedplate: true);
public PrinterConfig Printer { get; }
public Action RedeemDesignCode;
public Action EnterShareCode;
@ -533,7 +534,7 @@ namespace MatterHackers.MatterControl
public static Action SignInAction;
public static Action SignOutAction;
public static Action WebRequestFailed;
public static Action WebRequestSucceeded;
@ -757,6 +758,8 @@ namespace MatterHackers.MatterControl
Object3D.AssetsPath = ApplicationDataStorage.Instance.LibraryAssetsPath;
this.Printer = new PrinterConfig(loadLastBedplate: true);
this.Library = new LibraryConfig();
this.Library.ContentProviders.Add(new[] { "stl", "amf", "mcx" }, new MeshContentProvider());