Index: Core/Common/src/Core.Common.Controls.TreeView/TreeNode.cs =================================================================== diff -u -rcc608d648b3fe89d6f748f5245c532014186d578 -r2fbd76129bb2bbc07cd625614b38012fbbf88cc4 --- Core/Common/src/Core.Common.Controls.TreeView/TreeNode.cs (.../TreeNode.cs) (revision cc608d648b3fe89d6f748f5245c532014186d578) +++ Core/Common/src/Core.Common.Controls.TreeView/TreeNode.cs (.../TreeNode.cs) (revision 2fbd76129bb2bbc07cd625614b38012fbbf88cc4) @@ -20,7 +20,6 @@ { this.treeView = treeView; nodes = new TreeNodeList(base.Nodes); - IsVisible = true; } /// @@ -85,6 +84,7 @@ { throw new ArgumentNullException(); } + if (tag == value) { return; @@ -96,17 +96,15 @@ } tag = value; - observable = tag as IObservable; + if (observable != null) { observable.Attach(this); } } } - public new bool IsVisible { get; set; } - public new TreeNode Parent { get @@ -139,32 +137,32 @@ } } - public new IList Nodes + public TreeNode PreviousNode { get { - if (!isLoaded) - { - RefreshChildNodes(); - } - - return nodes; + return (TreeNode) PrevNode; } } - public TreeNode PreviousNode + public TreeNode PreviousVisibleNode { get { - return (TreeNode) PrevNode; + return (TreeNode) PrevVisibleNode; } } - public TreeNode PreviousVisibleNode + public new IList Nodes { get { - return (TreeNode) PrevVisibleNode; + if (!isLoaded) + { + RefreshChildNodes(); + } + + return nodes; } } @@ -191,6 +189,7 @@ } public Image Image { get; set; } + public bool IsUpdating { get; private set; } private void RefreshChildNodes(bool forcedRefresh = false) @@ -271,14 +270,6 @@ return nodes.FirstOrDefault(node => node.Tag == item); } - public void ShowContextMenu(Point location) - { - if (base.ContextMenuStrip != null) - { - base.ContextMenuStrip.Show(location); - } - } - public void Dispose() { if (observable != null) Index: Core/Common/src/Core.Common.Controls.TreeView/TreeView.cs =================================================================== diff -u -rcc608d648b3fe89d6f748f5245c532014186d578 -r2fbd76129bb2bbc07cd625614b38012fbbf88cc4 --- Core/Common/src/Core.Common.Controls.TreeView/TreeView.cs (.../TreeView.cs) (revision cc608d648b3fe89d6f748f5245c532014186d578) +++ Core/Common/src/Core.Common.Controls.TreeView/TreeView.cs (.../TreeView.cs) (revision 2fbd76129bb2bbc07cd625614b38012fbbf88cc4) @@ -486,11 +486,11 @@ return true; case Keys.Apps: - if (SelectedNode != null && ContextMenu != null) + if (SelectedNode != null && ContextMenu != null && SelectedNode.ContextMenuStrip != null) { Point location = SelectedNode.Bounds.Location; location.Offset(0, SelectedNode.Bounds.Height); - SelectedNode.ShowContextMenu(location); + SelectedNode.ContextMenuStrip.Show(location); } return true; Index: Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Forms/MapLegendView/MapLayerTreeViewNodePresenter.cs =================================================================== diff -u -r2f45fd13d134ed6bdfcdb0967d07516beb30409c -r2fbd76129bb2bbc07cd625614b38012fbbf88cc4 --- Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Forms/MapLegendView/MapLayerTreeViewNodePresenter.cs (.../MapLayerTreeViewNodePresenter.cs) (revision 2f45fd13d134ed6bdfcdb0967d07516beb30409c) +++ Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Forms/MapLegendView/MapLayerTreeViewNodePresenter.cs (.../MapLayerTreeViewNodePresenter.cs) (revision 2fbd76129bb2bbc07cd625614b38012fbbf88cc4) @@ -40,7 +40,6 @@ node.Text = layer.Name; node.Checked = layer.Visible; node.ShowCheckBox = true; - node.IsVisible = layer.ShowInTreeView; } public override IEnumerable GetChildNodeObjects(ILayer mapLayer) Index: Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Forms/MapLegendView/MapTreeViewNodePresenter.cs =================================================================== diff -u -r5fa6d278e3763a01d20799215bec6f6e398ee417 -r2fbd76129bb2bbc07cd625614b38012fbbf88cc4 --- Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Forms/MapLegendView/MapTreeViewNodePresenter.cs (.../MapTreeViewNodePresenter.cs) (revision 5fa6d278e3763a01d20799215bec6f6e398ee417) +++ Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Forms/MapLegendView/MapTreeViewNodePresenter.cs (.../MapTreeViewNodePresenter.cs) (revision 2fbd76129bb2bbc07cd625614b38012fbbf88cc4) @@ -1,6 +1,5 @@ using System; using System.Collections; -using System.ComponentModel; using System.Drawing; using System.Linq; using System.Windows.Forms;