mirror of
https://github.com/greenshot/greenshot
synced 2025-07-30 11:40:40 -07:00
Creating a branch 1.1 where I will try to make the 1.1.7 build available, this means I need to merge some changes from 2.0 to here.
This commit is contained in:
parent
2a8e2475d8
commit
a03bc31aef
247 changed files with 6986 additions and 8233 deletions
|
@ -189,8 +189,10 @@ namespace GreenshotPlugin.Core {
|
|||
break;
|
||||
case ToolStripDropDownCloseReason.Keyboard:
|
||||
// Dispose as the close is clicked
|
||||
surface.Dispose();
|
||||
surface = null;
|
||||
if (!captureDetails.HasDestination("Editor")) {
|
||||
surface.Dispose();
|
||||
surface = null;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
eventArgs.Cancel = true;
|
||||
|
@ -209,7 +211,6 @@ namespace GreenshotPlugin.Core {
|
|||
if (clickedDestination == null) {
|
||||
return;
|
||||
}
|
||||
bool isEditor = "Editor".Equals(clickedDestination.Designation);
|
||||
menu.Tag = clickedDestination.Designation;
|
||||
// Export
|
||||
exportInformation = clickedDestination.ExportCapture(true, surface, captureDetails);
|
||||
|
@ -218,8 +219,8 @@ namespace GreenshotPlugin.Core {
|
|||
// close menu if the destination wasn't the editor
|
||||
menu.Close();
|
||||
|
||||
// Cleanup surface, only if the destination wasn't the editor
|
||||
if (!isEditor) {
|
||||
// Cleanup surface, only if there is no editor in the destinations and we didn't export to the editor
|
||||
if (!captureDetails.HasDestination("Editor") && !"Editor".Equals(clickedDestination.Designation)) {
|
||||
surface.Dispose();
|
||||
surface = null;
|
||||
}
|
||||
|
@ -245,9 +246,10 @@ namespace GreenshotPlugin.Core {
|
|||
closeItem.Click += delegate {
|
||||
// This menu entry is the close itself, we can dispose the surface
|
||||
menu.Close();
|
||||
// Dispose as the close is clicked
|
||||
surface.Dispose();
|
||||
surface = null;
|
||||
if (!captureDetails.HasDestination("Editor")) {
|
||||
surface.Dispose();
|
||||
surface = null;
|
||||
}
|
||||
};
|
||||
menu.Items.Add(closeItem);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue