From 838d64e8e9609f88a930a6782300ba8def229837 Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Mon, 27 Sep 2010 17:04:09 +0200 Subject: treeview: minor bugfix in the accuracy of selecting a node with the mouse. An earlier commit fixed the selected rectangle offset painting. I forgot to also fix the node selection via mouse click. They y offsets was a bit off. --- src/gui/fpg_tree.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/gui/fpg_tree.pas b/src/gui/fpg_tree.pas index f4cccb8b..b7dc5991 100644 --- a/src/gui/fpg_tree.pas +++ b/src/gui/fpg_tree.pas @@ -1332,7 +1332,7 @@ begin x := x + FXOffset; cancel := False; last := RootNode; - while not (((i - 1) * GetNodeHeight - 2 <= y) and ((i) * GetNodeHeight + 2 >= y)) do + while not ((((i - 1) * GetNodeHeight) <= y) and ((i * GetNodeHeight) >= y)) do begin node := NextVisualNode(last); if node = nil then -- cgit v1.2.3-70-g09d2