Index: Core/Common/src/Core.Common.Controls.TreeView/TreeView.cs =================================================================== diff -u -r5fa6d278e3763a01d20799215bec6f6e398ee417 -rfa83e878a42e5a19271f73dbcb754c58a6b00a59 --- Core/Common/src/Core.Common.Controls.TreeView/TreeView.cs (.../TreeView.cs) (revision 5fa6d278e3763a01d20799215bec6f6e398ee417) +++ Core/Common/src/Core.Common.Controls.TreeView/TreeView.cs (.../TreeView.cs) (revision fa83e878a42e5a19271f73dbcb754c58a6b00a59) @@ -70,8 +70,6 @@ MouseDown += TreeViewMouseDown; MouseClick += TreeViewClick; - SelectNodeOnRightMouseClick = true; // default behaviour - // http://dev.nomad-net.info/articles/double-buffered-tree-and-list-views // Enable default double buffering processing SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint | ControlStyles.OptimizedDoubleBuffer | ControlStyles.ResizeRedraw, true); @@ -88,8 +86,6 @@ [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] public Func OnProcessCmdKey { get; set; } - public bool SelectNodeOnRightMouseClick { get; set; } - [Browsable(false)] [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] public new TreeNode SelectedNode @@ -115,18 +111,10 @@ { get { - if (IsDisposed || controller == null) - { - return null; - } return controller.Data; } set { - if (IsDisposed || controller == null) - { - return; - } controller.Data = value; } } @@ -255,11 +243,8 @@ public void UpdateNode(TreeNode treeNode) { - if (controller != null) - { - controller.UpdateNode(treeNode, treeNode.Tag); - FireOnUpdateEvent(treeNode); - } + controller.UpdateNode(treeNode, treeNode.Tag); + FireOnUpdateEvent(treeNode); } /// @@ -276,10 +261,7 @@ public void RefreshChildNodes(TreeNode treeNode) { - if (controller != null) - { - controller.RefreshChildNodes(treeNode); - } + controller.RefreshChildNodes(treeNode); } public void TryDeleteNodeData(TreeNode treeNode) @@ -318,7 +300,7 @@ public override void Refresh() { - if (Nodes.Count == 0 || controller == null) + if (Nodes.Count == 0) { return; } @@ -417,19 +399,6 @@ ((TreeNode) e.Node).DrawNode(e.Graphics, selected); } - protected override void Dispose(bool disposing) - { - if (disposing && controller != null) - { - controller = null; - } - - if (IsHandleCreated) - { - base.Dispose(disposing); - } - } - protected override void OnAfterLabelEdit(NodeLabelEditEventArgs e) { BeginUpdate(); @@ -719,11 +688,6 @@ private void TreeViewClick(object sender, MouseEventArgs e) { - if (e.Button == MouseButtons.Right && !SelectNodeOnRightMouseClick) - { - return; - } - var point = PointToClient(MousePosition); var node = (TreeNode) GetNodeAt(point); if (node == null) Index: Core/Plugins/src/Core.Plugins.Charting/Forms/ChartLegendView.Designer.cs =================================================================== diff -u -r477b3dd45b75bf40fcdd4dcba75ae194ea201446 -rfa83e878a42e5a19271f73dbcb754c58a6b00a59 --- Core/Plugins/src/Core.Plugins.Charting/Forms/ChartLegendView.Designer.cs (.../ChartLegendView.Designer.cs) (revision 477b3dd45b75bf40fcdd4dcba75ae194ea201446) +++ Core/Plugins/src/Core.Plugins.Charting/Forms/ChartLegendView.Designer.cs (.../ChartLegendView.Designer.cs) (revision fa83e878a42e5a19271f73dbcb754c58a6b00a59) @@ -109,7 +109,6 @@ this.treeView.HideSelection = false; this.treeView.LabelEdit = true; this.treeView.Name = "treeView"; - this.treeView.SelectNodeOnRightMouseClick = true; // // ChartLegendView // Index: Core/Plugins/src/Core.Plugins.OxyPlot/Legend/LegendView.Designer.cs =================================================================== diff -u -r5a98830aee77b1ee0158c11ba5cccffc656226e0 -rfa83e878a42e5a19271f73dbcb754c58a6b00a59 --- Core/Plugins/src/Core.Plugins.OxyPlot/Legend/LegendView.Designer.cs (.../LegendView.Designer.cs) (revision 5a98830aee77b1ee0158c11ba5cccffc656226e0) +++ Core/Plugins/src/Core.Plugins.OxyPlot/Legend/LegendView.Designer.cs (.../LegendView.Designer.cs) (revision fa83e878a42e5a19271f73dbcb754c58a6b00a59) @@ -43,7 +43,6 @@ this.seriesTree.HideSelection = false; this.seriesTree.LabelEdit = true; this.seriesTree.Name = "seriesTree"; - this.seriesTree.SelectNodeOnRightMouseClick = true; // // LegendView // Index: Core/Plugins/src/Core.Plugins.ProjectExplorer/ProjectTreeView.cs =================================================================== diff -u -rd7da4fd9051547085f0cbbec790eda9cb8ca7f14 -rfa83e878a42e5a19271f73dbcb754c58a6b00a59 --- Core/Plugins/src/Core.Plugins.ProjectExplorer/ProjectTreeView.cs (.../ProjectTreeView.cs) (revision d7da4fd9051547085f0cbbec790eda9cb8ca7f14) +++ Core/Plugins/src/Core.Plugins.ProjectExplorer/ProjectTreeView.cs (.../ProjectTreeView.cs) (revision fa83e878a42e5a19271f73dbcb754c58a6b00a59) @@ -166,22 +166,19 @@ return false; } - var control = (keyData & Keys.Control) == Keys.Control; - var alt = (keyData & Keys.Alt) == Keys.Alt; - if (keyData == Keys.Enter) { gui.CommandHandler.OpenViewForSelection(); return true; } + if (keyData == Keys.Delete) { treeView.TryDeleteSelectedNodeData(); return true; } - if (control) {} if (keyData == Keys.Escape) { Index: Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Forms/MapLegendView/MapLegendView.Designer.cs =================================================================== diff -u -r2316f13e1e3c4a7f31e0d96faa84e71edf8bf325 -rfa83e878a42e5a19271f73dbcb754c58a6b00a59 --- Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Forms/MapLegendView/MapLegendView.Designer.cs (.../MapLegendView.Designer.cs) (revision 2316f13e1e3c4a7f31e0d96faa84e71edf8bf325) +++ Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Forms/MapLegendView/MapLegendView.Designer.cs (.../MapLegendView.Designer.cs) (revision fa83e878a42e5a19271f73dbcb754c58a6b00a59) @@ -229,7 +229,6 @@ this.TreeView.HideSelection = false; this.TreeView.LabelEdit = true; this.TreeView.Name = "TreeView"; - this.TreeView.SelectNodeOnRightMouseClick = true; // // contextMenuMap //