Remove Run on Idle due too regression

- Added Additional guard to saving profile
This commit is contained in:
Matt Moening 2016-09-16 13:11:48 -07:00
parent c8bdb5b77c
commit b051b2bf54
2 changed files with 3 additions and 2 deletions

View file

@ -549,7 +549,7 @@ namespace MatterHackers.MatterControl
Load?.Invoke(this, null);
// Pushing this after load fixes that empty printer list
UiThread.RunOnIdle(ApplicationController.Instance.UserChanged);
ApplicationController.Instance.UserChanged();
if (!System.IO.File.Exists(@"/storage/sdcard0/Download/LaunchTestPrint.stl"))
{

View file

@ -472,7 +472,8 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
this.id = value;
}
if (File.Exists(ProfilePath))
// If the local file exists and the PrinterInfo has been added to ProfileManager, then it's safe to call profile.Save, otherwise...
if (File.Exists(ProfilePath) && ProfileManager.Instance[this.id] != null)
{
var profile = PrinterSettings.LoadFile(ProfilePath);
profile.ID = value;