LCL: TTreeView: fixed DisplayExpandSignLeft with tvoShowRoot, bug #12866

git-svn-id: trunk@17958 -
This commit is contained in:
mattias 2008-12-26 23:25:16 +00:00
parent d6a2584340
commit 60b5ca6f81

View File

@ -1483,11 +1483,15 @@ end;
function TTreeNode.DisplayExpandSignLeft: integer;
var
TV: TCustomTreeView;
l: LongInt;
begin
Result:=0;
TV:=TreeView;
if TV<>nil then
inc(Result,TV.Indent*Level+TV.BorderWidth-TV.FScrolledLeft);
if TV=nil then exit;
l:=Level;
if not (tvoShowRoot in TV.Options) then
dec(l);
inc(Result,TV.Indent*l+TV.BorderWidth-TV.FScrolledLeft);
end;
function TTreeNode.DisplayExpandSignRect: TRect;
@ -4148,8 +4152,8 @@ var
var
CurMid: integer;
begin
if CurNode <> nil then
begin
if (CurNode <> nil) and (tvoShowRoot in Options) or (CurNode.Parent<>nil)
then begin
Result := DrawTreeLines(CurNode.Parent);
if ShowLines then
begin