Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVsevolod Kukol <sevoku@microsoft.com>2017-01-31 12:25:00 +0300
committerVsevolod Kukol <sevoku@microsoft.com>2017-02-01 11:01:17 +0300
commit07cb188b9c0cd51749e8ccb3e558da3e838c29bf (patch)
tree12b311f7c2594ae0b524e2c92fdcfe7135a563da /main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components
parentb4557d381c19fce26faa9ed7e05dfe942f430ab8 (diff)
[Ide] Fix context menu positioning for some Gtk.TreeView based widgets
Gtk.TreeView contains a windget window and a so called BinWindow. Both of them raise mouse events with own pointer coordinates, which may need to be converted. Additionally the context menu can be requested by OnPopupMenu without valid EventButton arguments resulting in NREs if not handled correctly. In this case we show the context menu at the position of the current selected item.
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components')
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/ExtensibleTreeView.cs11
1 files changed, 1 insertions, 10 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/ExtensibleTreeView.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/ExtensibleTreeView.cs
index a13e0aa4e5..0ee396931e 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/ExtensibleTreeView.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/ExtensibleTreeView.cs
@@ -1946,16 +1946,7 @@ namespace MonoDevelop.Ide.Gui.Components
if (entryset == null)
return;
- if (evt == null) {
- var paths = tree.Selection.GetSelectedRows ();
- if (paths != null) {
- var area = tree.GetCellArea (paths [0], tree.Columns [0]);
-
- IdeApp.CommandService.ShowContextMenu (this, area.Left, area.Top, entryset, this);
- }
- } else {
- IdeApp.CommandService.ShowContextMenu (this, evt, entryset, this);
- }
+ tree.ShowContextMenu (evt, entryset, this);
}
CommandEntrySet BuildEntrySet ()