diff -r 1f5cf5d533e6 -r a35a89a35532 GUI/MainForm.cs --- a/GUI/MainForm.cs Sun May 15 20:48:52 2011 +0000 +++ b/GUI/MainForm.cs Sun May 15 21:43:40 2011 +0000 @@ -76,6 +76,8 @@ private WmiProvider wmiProvider; + private bool selectionDragging = false; + public MainForm() { InitializeComponent(); @@ -629,9 +631,19 @@ } private void treeView_MouseMove(object sender, MouseEventArgs e) { - if ((e.Button & (MouseButtons.Left | MouseButtons.Right)) > 0) { - treeView.SelectedNode = treeView.GetNodeAt(e.Location); - } + selectionDragging = selectionDragging & + (e.Button & (MouseButtons.Left | MouseButtons.Right)) > 0; + + if (selectionDragging) + treeView.SelectedNode = treeView.GetNodeAt(e.Location); + } + + private void treeView_MouseDown(object sender, MouseEventArgs e) { + selectionDragging = true; + } + + private void treeView_MouseUp(object sender, MouseEventArgs e) { + selectionDragging = false; } } }