From f31a432383c86f321c1c77153835243089fe8fdb Mon Sep 17 00:00:00 2001 From: RKrom Date: Fri, 27 Jan 2012 08:52:40 +0000 Subject: [PATCH] Generate new image when Surface is modified, otherwise we export the initially opened or save file even though changes were made! git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1611 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4 --- Greenshot/Destinations/EmailDestination.cs | 2 +- Greenshot/Destinations/ExcelDestination.cs | 2 +- Greenshot/Destinations/PowerpointDestination.cs | 2 +- Greenshot/Destinations/WordDestination.cs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Greenshot/Destinations/EmailDestination.cs b/Greenshot/Destinations/EmailDestination.cs index 835be2cc1..5de43e9c4 100644 --- a/Greenshot/Destinations/EmailDestination.cs +++ b/Greenshot/Destinations/EmailDestination.cs @@ -167,7 +167,7 @@ namespace Greenshot.Destinations { // Outlook logic string tmpFile = captureDetails.Filename; - if (tmpFile == null) { + if (tmpFile == null || surface.Modified) { using (Image image = surface.GetImageForExport()) { tmpFile = ImageOutput.SaveNamedTmpFile(image, captureDetails, conf.OutputFileFormat, conf.OutputFileJpegQuality); } diff --git a/Greenshot/Destinations/ExcelDestination.cs b/Greenshot/Destinations/ExcelDestination.cs index a7dcfdb14..5af719f90 100644 --- a/Greenshot/Destinations/ExcelDestination.cs +++ b/Greenshot/Destinations/ExcelDestination.cs @@ -107,7 +107,7 @@ namespace Greenshot.Destinations { public override bool ExportCapture(ISurface surface, ICaptureDetails captureDetails) { string tmpFile = captureDetails.Filename; - if (tmpFile == null) { + if (tmpFile == null || surface.Modified) { using (Image image = surface.GetImageForExport()) { tmpFile = ImageOutput.SaveNamedTmpFile(image, captureDetails, conf.OutputFileFormat, conf.OutputFileJpegQuality); } diff --git a/Greenshot/Destinations/PowerpointDestination.cs b/Greenshot/Destinations/PowerpointDestination.cs index 19fa161f8..259fe846d 100644 --- a/Greenshot/Destinations/PowerpointDestination.cs +++ b/Greenshot/Destinations/PowerpointDestination.cs @@ -108,7 +108,7 @@ namespace Greenshot.Destinations { public override bool ExportCapture(ISurface surface, ICaptureDetails captureDetails) { string tmpFile = captureDetails.Filename; Size imageSize = Size.Empty; - if (tmpFile == null) { + if (tmpFile == null || surface.Modified) { using (Image image = surface.GetImageForExport()) { tmpFile = ImageOutput.SaveNamedTmpFile(image, captureDetails, conf.OutputFileFormat, conf.OutputFileJpegQuality); imageSize = image.Size; diff --git a/Greenshot/Destinations/WordDestination.cs b/Greenshot/Destinations/WordDestination.cs index 798e6f911..e779b6660 100644 --- a/Greenshot/Destinations/WordDestination.cs +++ b/Greenshot/Destinations/WordDestination.cs @@ -109,7 +109,7 @@ namespace Greenshot.Destinations { public override bool ExportCapture(ISurface surface, ICaptureDetails captureDetails) { string tmpFile = captureDetails.Filename; - if (tmpFile == null) { + if (tmpFile == null || surface.Modified) { using (Image image = surface.GetImageForExport()) { tmpFile = ImageOutput.SaveNamedTmpFile(image, captureDetails, conf.OutputFileFormat, conf.OutputFileJpegQuality); }