Error in TCustomTreeView, on Handling clicks (ExpandSign)
Original Reporter info from Mantis: LU-HO
-
Reporter name:
Original Reporter info from Mantis: LU-HO
- Reporter name:
Description:
If you have deactivate the ShowButtons option, the click on the (not showed) ExpandSign will expand/collaps the tree.
To fix the Error the followed should be changed:
file: lazarus\lcl\include\treeview.inc
function: procedure TCustomTreeView.MouseDown(Button: TMouseButton; Shift: TShiftState;
Line: 4658
original lines:
if CursorNode.HasChildren
and (LogicalX>=CursorNode.DisplayExpandSignLeft)
and (LogicalX<CursorNode.DisplayExpandSignRight) then begin
changed lines:
if CursorNode.HasChildren
and (LogicalX>=CursorNode.DisplayExpandSignLeft)
and (LogicalX<CursorNode.DisplayExpandSignRight) then begin
// mousedown occured on expand sign
if GetShowButtons then begin
//if expand sign is enabled -> expand/collapse
CursorNode.Expanded:=not CursorNode.Expanded;
end;
Mantis conversion info:
- Mantis ID: 13216
- Version: 0.9.27 (SVN)
- Fixed in version: 0.9.27 (SVN)
- Fixed in revision: 19557 (#838bb221)
- Target version: 0.9.28