Fix ctb and pws

* (Fix) ctb and pws: Renders a bad file after save, this was introduced with cancelled saves feature
* (Fix) When cancel a file convertion, it now deletes the target file
This commit is contained in:
Tiago Conceição
2020-09-14 21:55:04 +01:00
parent 4cf6be8c97
commit 8bec024315
5 changed files with 14 additions and 8 deletions
+5 -2
View File
@@ -1424,7 +1424,10 @@ namespace UVtools.GUI
}
catch (OperationCanceledException)
{
if (File.Exists(dialog.FileName))
{
File.Delete(dialog.FileName);
}
}
catch (Exception ex)
{
@@ -2013,7 +2016,7 @@ namespace UVtools.GUI
}
var oldFile = SlicerFile.FileFullPath;
var tempFile = filepath + ".tmp";
var tempFile = filepath + FileFormat.TemporaryFileAppend;
DisableGUI();
FrmLoading.SetDescription($"Saving {Path.GetFileName(filepath)}");