From 4acbe385868243bf4ef90b9b2a77afce2c1a47c1 Mon Sep 17 00:00:00 2001 From: Jaex Date: Wed, 30 Jul 2014 14:15:46 +0300 Subject: [PATCH] Image editor when saved set modified false --- GreenshotImageEditor/Forms/ImageEditorForm.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/GreenshotImageEditor/Forms/ImageEditorForm.cs b/GreenshotImageEditor/Forms/ImageEditorForm.cs index aecef3c5d..a32455c6e 100644 --- a/GreenshotImageEditor/Forms/ImageEditorForm.cs +++ b/GreenshotImageEditor/Forms/ImageEditorForm.cs @@ -330,6 +330,8 @@ public void SetImagePath(string fullpath) } //updateStatusLabel(string.Format("Image saved to {0}.", fullpath), fileSavedStatusContextMenu); SetTitle(Path.GetFileName(fullpath)); + + btnSave.Enabled = File.Exists(surface.LastSaveFullPath); } private void surface_DrawingModeChanged(object source, SurfaceDrawingModeEventArgs eventArgs) @@ -675,7 +677,7 @@ private void ImageEditorFormFormClosing(object sender, FormClosingEventArgs e) buttons = MessageBoxButtons.YesNo; } - DialogResult result = MessageBox.Show("Do you want the save the screenshot?", "Save image?", buttons, MessageBoxIcon.Question); + DialogResult result = MessageBox.Show("Do you want to save the screenshot?", "Save confirmation", buttons, MessageBoxIcon.Question); if (result == DialogResult.Cancel) { @@ -1363,6 +1365,7 @@ public void OnImageSaveRequested() using (Image img = surface.GetImageForExport()) { ImageSaveRequested(img, surface.LastSaveFullPath); + surface.Modified = false; } } } @@ -1374,6 +1377,7 @@ public void OnImageSaveAsRequested() using (Image img = surface.GetImageForExport()) { string newFilePath = ImageSaveAsRequested(img, surface.LastSaveFullPath); + surface.Modified = false; if (!string.IsNullOrEmpty(newFilePath)) { SetImagePath(newFilePath);