From 44f1fc48daa39ba2f935edca6a9c6ea4a3f248f9 Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Sun, 9 Nov 2014 17:36:22 +0000 Subject: [PATCH] virtualtreeview-new: Fix "Cannot click tree items if tree is scrolled down", issue #26590, patch by Tsvetoslav git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3712 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- .../virtualtreeview-new/trunk/VirtualTrees.pas | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/components/virtualtreeview-new/trunk/VirtualTrees.pas b/components/virtualtreeview-new/trunk/VirtualTrees.pas index bd9728703..e3945c249 100644 --- a/components/virtualtreeview-new/trunk/VirtualTrees.pas +++ b/components/virtualtreeview-new/trunk/VirtualTrees.pas @@ -27074,6 +27074,9 @@ begin begin if X >= Header.Columns.GetVisibleFixedWidth then Inc(X, FEffectiveOffsetX); + //lclheader + if hoVisible in FHeader.Options then + Dec(Y, FHeader.Height); Inc(Y, -FOffsetY); end; HitInfo.HitPoint.X := X; @@ -27082,17 +27085,6 @@ begin // If the point is in the tree area then check the nodes. if HitInfo.HitPositions = [] then begin - // Convert position into absolute coordinate if necessary. - if Relative then - begin - if X > Header.Columns.GetVisibleFixedWidth then - Inc(X, FEffectiveOffsetX); - //lclheader - if hoVisible in FHeader.Options then - Dec(Y, FHeader.Height); - Dec(Y, FOffsetY); - end; - HitInfo.HitNode := InternalGetNodeAt(X, Y, False, NodeTop); if HitInfo.HitNode = nil then Include(HitInfo.HitPositions, hiNowhere)