Index: Core/Plugins/src/Core.Plugins.Map/Legend/MapLegendView.cs =================================================================== diff -u -r9d437f957dbdd5360f2f5e6ab4c80993a10b85c7 -r37afeaa9d3510fc3c99a4177023c03a3ca630a5f --- Core/Plugins/src/Core.Plugins.Map/Legend/MapLegendView.cs (.../MapLegendView.cs) (revision 9d437f957dbdd5360f2f5e6ab4c80993a10b85c7) +++ Core/Plugins/src/Core.Plugins.Map/Legend/MapLegendView.cs (.../MapLegendView.cs) (revision 37afeaa9d3510fc3c99a4177023c03a3ca630a5f) @@ -305,7 +305,7 @@ private ContextMenuStrip FeatureBasedMapDataContextContextMenuStrip(FeatureBasedMapDataContext mapDataContext, object parentData, TreeViewControl treeView) { - return contextMenuBuilderProvider.Get(mapDataContext.WrappedData, treeView) + return contextMenuBuilderProvider.Get(mapDataContext, treeView) .AddCustomItem(CreateZoomToExtentsItem(mapDataContext)) .AddSeparator() .AddDeleteItem() @@ -352,7 +352,7 @@ private static void MapDataCollectionOnDrop(object droppedData, object newParentData, object oldParentData, int position, TreeViewControl control) { - var mapDataContext = (MapDataCollectionContext) droppedData; + var mapDataContext = (MapDataContext) droppedData; MapData mapData = mapDataContext.WrappedData; var parentContext = (MapDataCollectionContext) oldParentData; Index: Core/Plugins/test/Core.Plugins.Map.Test/Legend/FeatureBasedMapDataContextTreeNodeInfoTest.cs =================================================================== diff -u -r842679c47f28f5f6349a2a34a96fc93adb094e51 -r37afeaa9d3510fc3c99a4177023c03a3ca630a5f --- Core/Plugins/test/Core.Plugins.Map.Test/Legend/FeatureBasedMapDataContextTreeNodeInfoTest.cs (.../FeatureBasedMapDataContextTreeNodeInfoTest.cs) (revision 842679c47f28f5f6349a2a34a96fc93adb094e51) +++ Core/Plugins/test/Core.Plugins.Map.Test/Legend/FeatureBasedMapDataContextTreeNodeInfoTest.cs (.../FeatureBasedMapDataContextTreeNodeInfoTest.cs) (revision 37afeaa9d3510fc3c99a4177023c03a3ca630a5f) @@ -464,6 +464,7 @@ { // Setup var mapData = new TestFeatureBasedMapData(); + FeatureBasedMapDataContext context = GetContext(mapData); var builder = mocks.StrictMock(); using (mocks.Ordered()) { @@ -475,12 +476,12 @@ builder.Expect(mb => mb.Build()).Return(null); } - contextMenuBuilderProvider.Expect(p => p.Get(mapData, null)).Return(builder); + contextMenuBuilderProvider.Expect(p => p.Get(context, null)).Return(builder); mocks.ReplayAll(); // Call - info.ContextMenuStrip(GetContext(mapData), null, null); + info.ContextMenuStrip(context, null, null); // Assert // Assert expectancies are called in TearDown()