Fix slice engine ui handling.

This commit is contained in:
Kevin Pope 2014-09-05 13:04:41 -07:00
parent 9bbd272467
commit 5354d3976c
5 changed files with 28 additions and 4 deletions

View file

@ -37,7 +37,14 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
}
else
{
return System.IO.File.Exists(this.GetEnginePath());
if (this.GetEnginePath() == null)
{
return false;
}
else
{
return System.IO.File.Exists(this.GetEnginePath());
}
}
}

View file

@ -31,7 +31,14 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
public virtual bool Exists()
{
return System.IO.File.Exists(this.GetEnginePath());
if (this.GetEnginePath() == null)
{
return false;
}
else
{
return System.IO.File.Exists(this.GetEnginePath());
}
}
public string GetEnginePath()
@ -47,6 +54,9 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
case OSType.X11:
return getLinuxPath();
case OSType.Android:
return null;
default:
throw new NotImplementedException();
}

View file

@ -149,7 +149,8 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
}
else
{
throw new Exception("Slice engine is unavailable");
//throw new Exception("Slice engine is unavailable");
return null;
}
}