PrintitemWrapper now handles empty path.
This commit is contained in:
parent
7f1a7c0e8e
commit
d3c8c3ad45
1 changed files with 16 additions and 8 deletions
|
|
@ -189,16 +189,24 @@ namespace MatterHackers.MatterControl.PrintQueue
|
|||
|
||||
public string GetGCodePathAndFileName()
|
||||
{
|
||||
if (Path.GetExtension(FileLocation).ToUpper() == ".GCODE")
|
||||
if (FileLocation.Trim() != "")
|
||||
{
|
||||
return FileLocation;
|
||||
|
||||
if (Path.GetExtension(FileLocation).ToUpper() == ".GCODE")
|
||||
{
|
||||
return FileLocation;
|
||||
}
|
||||
|
||||
string engineString = ((int)ActivePrinterProfile.Instance.ActiveSliceEngineType).ToString();
|
||||
|
||||
string gcodeFileName = this.StlFileHashCode.ToString() + "_" + engineString + "_" + ActiveSliceSettings.Instance.GetHashCode().ToString();
|
||||
string gcodePathAndFileName = Path.Combine(DataStorage.ApplicationDataStorage.Instance.GCodeOutputPath, gcodeFileName + ".gcode");
|
||||
return gcodePathAndFileName;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
string engineString = ((int)ActivePrinterProfile.Instance.ActiveSliceEngineType).ToString();
|
||||
|
||||
string gcodeFileName = this.StlFileHashCode.ToString() + "_" + engineString + "_" + ActiveSliceSettings.Instance.GetHashCode().ToString();
|
||||
string gcodePathAndFileName = Path.Combine(DataStorage.ApplicationDataStorage.Instance.GCodeOutputPath, gcodeFileName + ".gcode");
|
||||
return gcodePathAndFileName;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue