mirror of
https://github.com/greenshot/greenshot
synced 2025-08-22 06:23:24 -07:00
Merge 0f6d374170
into 92a550591c
This commit is contained in:
commit
ca916c16d8
3 changed files with 14 additions and 1 deletions
|
@ -64,6 +64,8 @@ namespace Greenshot.Destinations {
|
||||||
|
|
||||||
public override ExportInformation ExportCapture(bool manuallyInitiated, ISurface surface, ICaptureDetails captureDetails) {
|
public override ExportInformation ExportCapture(bool manuallyInitiated, ISurface surface, ICaptureDetails captureDetails) {
|
||||||
ExportInformation exportInformation = new ExportInformation(Designation, Description);
|
ExportInformation exportInformation = new ExportInformation(Designation, Description);
|
||||||
|
// close the form after copying the image to clipboard
|
||||||
|
exportInformation.CloseForm = true;
|
||||||
try {
|
try {
|
||||||
ClipboardHelper.SetClipboardData(surface);
|
ClipboardHelper.SetClipboardData(surface);
|
||||||
exportInformation.ExportMade = true;
|
exportInformation.ExportMade = true;
|
||||||
|
|
|
@ -956,7 +956,11 @@ namespace Greenshot.Forms {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (destination.EditorShortcutKeys == keys) {
|
if (destination.EditorShortcutKeys == keys) {
|
||||||
destination.ExportCapture(true, _surface, _surface.CaptureDetails);
|
ExportInformation exportInformation = destination.ExportCapture(true, _surface, _surface.CaptureDetails);
|
||||||
|
if (exportInformation != null && exportInformation.ExportMade) {
|
||||||
|
if (exportInformation.CloseForm)
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1297,6 +1301,8 @@ namespace Greenshot.Forms {
|
||||||
ExportInformation exportInformation = clickedDestination?.ExportCapture(true, _surface, _surface.CaptureDetails);
|
ExportInformation exportInformation = clickedDestination?.ExportCapture(true, _surface, _surface.CaptureDetails);
|
||||||
if (exportInformation != null && exportInformation.ExportMade) {
|
if (exportInformation != null && exportInformation.ExportMade) {
|
||||||
_surface.Modified = false;
|
_surface.Modified = false;
|
||||||
|
if (exportInformation.CloseForm)
|
||||||
|
this.Close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,6 +48,11 @@ namespace GreenshotPlugin.Interfaces {
|
||||||
public string ErrorMessage { get; set; }
|
public string ErrorMessage { get; set; }
|
||||||
|
|
||||||
public string Filepath { get; set; }
|
public string Filepath { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Set to true to close the invoking form.
|
||||||
|
/// </summary>
|
||||||
|
public bool CloseForm { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue