summaryrefslogtreecommitdiff
path: root/src/gui/fpg_tree.pas
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2010-09-27 17:04:09 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2010-09-27 17:04:09 +0200
commit838d64e8e9609f88a930a6782300ba8def229837 (patch)
treeda2313c67d3e38d2b7b0fa273ecb4d2746e9dbb4 /src/gui/fpg_tree.pas
parent56825da49d54f081e734064891c5bc77537800b0 (diff)
downloadfpGUI-838d64e8e9609f88a930a6782300ba8def229837.tar.xz
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.
Diffstat (limited to 'src/gui/fpg_tree.pas')
-rw-r--r--src/gui/fpg_tree.pas2
1 files changed, 1 insertions, 1 deletions
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