mirror of
https://github.com/ShareX/ShareX.git
synced 2024-07-13 10:26:01 +12:00
Image editor when saved set modified false
This commit is contained in:
parent
f4d95ccf42
commit
4acbe38586
|
@ -330,6 +330,8 @@ public void SetImagePath(string fullpath)
|
||||||
}
|
}
|
||||||
//updateStatusLabel(string.Format("Image saved to {0}.", fullpath), fileSavedStatusContextMenu);
|
//updateStatusLabel(string.Format("Image saved to {0}.", fullpath), fileSavedStatusContextMenu);
|
||||||
SetTitle(Path.GetFileName(fullpath));
|
SetTitle(Path.GetFileName(fullpath));
|
||||||
|
|
||||||
|
btnSave.Enabled = File.Exists(surface.LastSaveFullPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void surface_DrawingModeChanged(object source, SurfaceDrawingModeEventArgs eventArgs)
|
private void surface_DrawingModeChanged(object source, SurfaceDrawingModeEventArgs eventArgs)
|
||||||
|
@ -675,7 +677,7 @@ private void ImageEditorFormFormClosing(object sender, FormClosingEventArgs e)
|
||||||
buttons = MessageBoxButtons.YesNo;
|
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)
|
if (result == DialogResult.Cancel)
|
||||||
{
|
{
|
||||||
|
@ -1363,6 +1365,7 @@ public void OnImageSaveRequested()
|
||||||
using (Image img = surface.GetImageForExport())
|
using (Image img = surface.GetImageForExport())
|
||||||
{
|
{
|
||||||
ImageSaveRequested(img, surface.LastSaveFullPath);
|
ImageSaveRequested(img, surface.LastSaveFullPath);
|
||||||
|
surface.Modified = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1374,6 +1377,7 @@ public void OnImageSaveAsRequested()
|
||||||
using (Image img = surface.GetImageForExport())
|
using (Image img = surface.GetImageForExport())
|
||||||
{
|
{
|
||||||
string newFilePath = ImageSaveAsRequested(img, surface.LastSaveFullPath);
|
string newFilePath = ImageSaveAsRequested(img, surface.LastSaveFullPath);
|
||||||
|
surface.Modified = false;
|
||||||
if (!string.IsNullOrEmpty(newFilePath))
|
if (!string.IsNullOrEmpty(newFilePath))
|
||||||
{
|
{
|
||||||
SetImagePath(newFilePath);
|
SetImagePath(newFilePath);
|
||||||
|
|
Loading…
Reference in a new issue