mirror of
https://github.com/greenshot/greenshot
synced 2025-07-16 10:03:44 -07:00
Fixed bug when using the editor button "export to outlook", closures & foreach variables don't mix!
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1662 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
9183e582df
commit
cd190b1c07
1 changed files with 5 additions and 4 deletions
|
@ -196,11 +196,12 @@ namespace Greenshot {
|
||||||
if (subDestinations.Count > 0) {
|
if (subDestinations.Count > 0) {
|
||||||
subDestinations.Sort();
|
subDestinations.Sort();
|
||||||
foreach(IDestination subDestination in subDestinations) {
|
foreach(IDestination subDestination in subDestinations) {
|
||||||
ToolStripMenuItem destinationMenuItem = new ToolStripMenuItem(subDestination.Description);
|
IDestination closureFixedDestination = subDestination;
|
||||||
destinationMenuItem.Tag = subDestination;
|
ToolStripMenuItem destinationMenuItem = new ToolStripMenuItem(closureFixedDestination.Description);
|
||||||
destinationMenuItem.Image = subDestination.DisplayIcon;
|
destinationMenuItem.Tag = closureFixedDestination;
|
||||||
|
destinationMenuItem.Image = closureFixedDestination.DisplayIcon;
|
||||||
destinationMenuItem.Click += delegate {
|
destinationMenuItem.Click += delegate {
|
||||||
subDestination.ExportCapture(surface, surface.CaptureDetails);
|
closureFixedDestination.ExportCapture(surface, surface.CaptureDetails);
|
||||||
};
|
};
|
||||||
destinationButton.DropDownItems.Add(destinationMenuItem);
|
destinationButton.DropDownItems.Add(destinationMenuItem);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue