diff --git a/Greenshot/releases/additional_files/readme.txt.template b/Greenshot/releases/additional_files/readme.txt.template index 469c391ea..cac8301f7 100644 --- a/Greenshot/releases/additional_files/readme.txt.template +++ b/Greenshot/releases/additional_files/readme.txt.template @@ -19,6 +19,8 @@ Bugs resolved: * Bug #1610: Image editor: 'Obfuscate' and 'Highlight' and more, now should rotate / resize correctly. * Bug #1619: Image editor: Autocrop now also considers the elements. +Changes: +* We cleaned up the dynamic destination context-menu: if an entry (e.g export to the editor) has child items (export to open editors) the parent is still selectable, we also no longer repeat the parent in the children. 1.1.9.13-g01ce82d Windows 8.1 & Box bug-fix Release diff --git a/GreenshotPlugin/Core/AbstractDestination.cs b/GreenshotPlugin/Core/AbstractDestination.cs index f15f1f00a..f518689d7 100644 --- a/GreenshotPlugin/Core/AbstractDestination.cs +++ b/GreenshotPlugin/Core/AbstractDestination.cs @@ -307,6 +307,9 @@ namespace GreenshotPlugin.Core { basisMenuItem.Tag = this; basisMenuItem.Text = Description; AddTagEvents(basisMenuItem, menu, Description); + basisMenuItem.Click -= destinationClickHandler; + basisMenuItem.Click += destinationClickHandler; + if (isDynamic && addDynamics) { basisMenuItem.DropDownOpening += delegate(object source, EventArgs eventArgs) { if (basisMenuItem.DropDownItems.Count == 0) { @@ -322,18 +325,6 @@ namespace GreenshotPlugin.Core { ToolStripMenuItem destinationMenuItem = null; - if (!useDynamicsOnly) { - destinationMenuItem = new ToolStripMenuItem(Description); - destinationMenuItem.Tag = this; - destinationMenuItem.Image = DisplayIcon; - destinationMenuItem.Click += destinationClickHandler; - AddTagEvents(destinationMenuItem, menu, Description); - - basisMenuItem.DropDownItems.Add(destinationMenuItem); - // invoke the "main" subdestination when clicking its parent - basisMenuItem.Click -= destinationClickHandler; - basisMenuItem.Click += destinationClickHandler; - } if (useDynamicsOnly && subDestinations.Count == 1) { basisMenuItem.Tag = subDestinations[0]; basisMenuItem.Text = subDestinations[0].Description; @@ -349,17 +340,9 @@ namespace GreenshotPlugin.Core { basisMenuItem.DropDownItems.Add(destinationMenuItem); } } - } else { - // Setting base "click" only if there are no sub-destinations - - // Make sure any previous handler is removed, otherwise it would be added multiple times! - basisMenuItem.Click -= destinationClickHandler; - basisMenuItem.Click += destinationClickHandler; } } }; - } else { - basisMenuItem.Click += destinationClickHandler; } return basisMenuItem;