mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 10:47:02 -07:00
Fixed issue that opening an image from the clipboard or file system still makes the editor ask for a save.
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1663 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
cd190b1c07
commit
f442d5e7ee
2 changed files with 5 additions and 6 deletions
|
@ -98,7 +98,7 @@ namespace Greenshot.Destinations {
|
|||
GC.WaitForPendingFinalizers();
|
||||
|
||||
try {
|
||||
ImageEditorForm editorForm = new ImageEditorForm(surface, false); // Output made??
|
||||
ImageEditorForm editorForm = new ImageEditorForm(surface, !surface.Modified); // Output made??
|
||||
|
||||
if (!string.IsNullOrEmpty(captureDetails.Filename)) {
|
||||
editorForm.SetImagePath(captureDetails.Filename);
|
||||
|
|
|
@ -406,12 +406,11 @@ namespace Greenshot.Helpers {
|
|||
bool outputMade = false;
|
||||
|
||||
// Make sure the user sees that the capture is made
|
||||
if (capture.CaptureDetails.CaptureMode != CaptureMode.File && capture.CaptureDetails.CaptureMode != CaptureMode.Clipboard) {
|
||||
DoCaptureFeedback();
|
||||
} else {
|
||||
// If File || Clipboard
|
||||
if (capture.CaptureDetails.CaptureMode == CaptureMode.File || capture.CaptureDetails.CaptureMode == CaptureMode.Clipboard) {
|
||||
// Maybe not "made" but the original is still there... somehow
|
||||
outputMade = true;
|
||||
} else {
|
||||
DoCaptureFeedback();
|
||||
}
|
||||
|
||||
LOG.Debug("A capture of: " + capture.CaptureDetails.Title);
|
||||
|
@ -423,6 +422,7 @@ namespace Greenshot.Helpers {
|
|||
|
||||
// Create Surface with capture, this way elements can be added automatically (like the mouse cursor)
|
||||
Surface surface = new Surface(capture);
|
||||
surface.Modified = !outputMade;
|
||||
|
||||
// Register notify events if this is wanted
|
||||
if (conf.ShowTrayNotification) {
|
||||
|
@ -508,7 +508,6 @@ namespace Greenshot.Helpers {
|
|||
if (Destinations.EditorDestination.DESIGNATION.Equals(destination.Designation) && destinationOk) {
|
||||
canDisposeSurface = false;
|
||||
}
|
||||
outputMade = outputMade || destinationOk;
|
||||
}
|
||||
}
|
||||
if (canDisposeSurface) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue