mirror of
https://github.com/greenshot/greenshot
synced 2025-07-15 01:23:47 -07:00
Changes to make the context menu work on multiple items
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1629 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
0398e831db
commit
08d56090c4
7 changed files with 186 additions and 127 deletions
|
@ -579,16 +579,20 @@ namespace Greenshot.Drawing {
|
|||
|
||||
// check contextmenu
|
||||
if (e.Button == MouseButtons.Right) {
|
||||
DrawableContainerList selectedList = null;
|
||||
if (selectedElements != null && selectedElements.Count > 0) {
|
||||
// ContainerList logik hier
|
||||
selectedList = selectedElements;
|
||||
} else {
|
||||
// Single element
|
||||
DrawableContainer rightClickedContainer = elements.ClickableElementAt(mouseStart.X, mouseStart.Y);
|
||||
if (rightClickedContainer != null) {
|
||||
SelectElement(rightClickedContainer);
|
||||
rightClickedContainer.ShowContextMenu(e);
|
||||
selectedList = new DrawableContainerList();
|
||||
selectedList.Add(rightClickedContainer);
|
||||
}
|
||||
}
|
||||
if (selectedList != null && selectedList.Count > 0) {
|
||||
selectedList.ShowContextMenu(e, this);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue