Index: src/DeltaShell/DeltaShell.Plugins.SharpMapGis.Gui/Forms/MapLegendView/MapLegendView.cs =================================================================== diff -u -r5fc71a385897af92ccb092f2f969b5709afab85a -rfa9b36343401d44cb6813d7871903782d0dedec9 --- src/DeltaShell/DeltaShell.Plugins.SharpMapGis.Gui/Forms/MapLegendView/MapLegendView.cs (.../MapLegendView.cs) (revision 5fc71a385897af92ccb092f2f969b5709afab85a) +++ src/DeltaShell/DeltaShell.Plugins.SharpMapGis.Gui/Forms/MapLegendView/MapLegendView.cs (.../MapLegendView.cs) (revision fa9b36343401d44cb6813d7871903782d0dedec9) @@ -24,7 +24,7 @@ public partial class MapLegendView : UserControl, IView { private static readonly ILog Log = LogManager.GetLogger(typeof(MapLegendView)); - private readonly IGui gui; //HACK: remove gui reference + private readonly IGui gui; private readonly IGisGuiService gisService; public Action OnOpenLayerAttributeTable = layer => { }; @@ -108,21 +108,19 @@ public ViewInfo ViewInfo { get; set; } - // TODO,HACK: these clicking methods below should be moved to service/command handlers - - public IMenuItem GetContextMenu(object nodeTag) + public ContextMenuStrip GetContextMenu(object nodeTag) { if (nodeTag is Layer) { - return new MenuItemContextMenuStripAdapter(contextMenuLayer); + return contextMenuLayer; } if (nodeTag is Client.WmsServerLayer) { - return new MenuItemContextMenuStripAdapter(contextMenuWmsLayer); + return contextMenuWmsLayer; } if (nodeTag is Map) { - return new MenuItemContextMenuStripAdapter(contextMenuMap); + return contextMenuMap; } return null;