mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-03 18:01:29 +02:00
LCL: TTreeView: fixed DisplayExpandSignLeft with tvoShowRoot, bug #12866
git-svn-id: trunk@17958 -
This commit is contained in:
parent
d6a2584340
commit
60b5ca6f81
@ -1483,11 +1483,15 @@ end;
|
|||||||
function TTreeNode.DisplayExpandSignLeft: integer;
|
function TTreeNode.DisplayExpandSignLeft: integer;
|
||||||
var
|
var
|
||||||
TV: TCustomTreeView;
|
TV: TCustomTreeView;
|
||||||
|
l: LongInt;
|
||||||
begin
|
begin
|
||||||
Result:=0;
|
Result:=0;
|
||||||
TV:=TreeView;
|
TV:=TreeView;
|
||||||
if TV<>nil then
|
if TV=nil then exit;
|
||||||
inc(Result,TV.Indent*Level+TV.BorderWidth-TV.FScrolledLeft);
|
l:=Level;
|
||||||
|
if not (tvoShowRoot in TV.Options) then
|
||||||
|
dec(l);
|
||||||
|
inc(Result,TV.Indent*l+TV.BorderWidth-TV.FScrolledLeft);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TTreeNode.DisplayExpandSignRect: TRect;
|
function TTreeNode.DisplayExpandSignRect: TRect;
|
||||||
@ -4148,8 +4152,8 @@ var
|
|||||||
var
|
var
|
||||||
CurMid: integer;
|
CurMid: integer;
|
||||||
begin
|
begin
|
||||||
if CurNode <> nil then
|
if (CurNode <> nil) and (tvoShowRoot in Options) or (CurNode.Parent<>nil)
|
||||||
begin
|
then begin
|
||||||
Result := DrawTreeLines(CurNode.Parent);
|
Result := DrawTreeLines(CurNode.Parent);
|
||||||
if ShowLines then
|
if ShowLines then
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user