mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-29 09:47:24 +01:00
lcl: TTreeView fixes by Anton Kavalenka
- call OnGetImageIndex, OnGetSelectedIndex when we need them, - don't start text editing when we click on icon (issue #0013325) git-svn-id: trunk@18990 -
This commit is contained in:
parent
918eaf1a50
commit
af8f77fb82
@ -4447,11 +4447,17 @@ begin
|
||||
if (Images<>nil) and PaintImages then
|
||||
begin
|
||||
if FSelectedNode <> Node then
|
||||
begin
|
||||
GetImageIndex(Node);
|
||||
ImgIndex := Node.ImageIndex
|
||||
end
|
||||
else
|
||||
begin
|
||||
GetSelectedIndex(Node);
|
||||
ImgIndex := Node.SelectedIndex;
|
||||
end;
|
||||
if (ImgIndex >= 0) and (ImgIndex < Images.Count) then
|
||||
Images.Draw(Canvas,x+1,NodeRect.Top,ImgIndex,true);
|
||||
Images.Draw(Canvas, x + 1, NodeRect.Top, ImgIndex, True);
|
||||
inc(x, Images.Width + 2);
|
||||
end;
|
||||
|
||||
@ -4661,7 +4667,7 @@ begin
|
||||
and (LogicalX<CursorNode.DisplayExpandSignRight) then begin
|
||||
// mousedown occured on expand sign -> expand/collapse
|
||||
CursorNode.Expanded:=not CursorNode.Expanded;
|
||||
end else if LogicalX>=CursorNode.DisplayIconLeft then begin
|
||||
end else if LogicalX>=CursorNode.DisplayTextLeft then begin
|
||||
// mousedown occured in text or icon
|
||||
// -> select node and begin drag operation
|
||||
{$IFDEF VerboseDrag}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user