LCL: call TreeView OnExpanded event after the screen has been updated (bug #10946)

git-svn-id: trunk@14418 -
This commit is contained in:
vincents 2008-03-05 08:25:02 +00:00
parent ec867d6c35
commit 6d91bd3510

View File

@ -558,12 +558,6 @@ begin
//DebugLn('[TTreeNode.DoExpand] Self=',DbgS(Self),' Text=',Text,
//' HasChildren=',HasChildren,' ExpandIt=',ExpandIt,' Expanded=',Expanded);
if HasChildren and (Expanded<>ExpandIt) then begin
if (TreeView<>nil) then begin
if ExpandIt then
TreeView.Expand(Self)
else
TreeView.Collapse(Self);
end;
if ExpandIt then
Include(FStates,nsExpanded)
else begin
@ -578,6 +572,10 @@ begin
tvsTopItemNeedsUpdate,tvsBottomItemNeedsUpdate,
tvsScrollbarChanged,tvsMaxRightNeedsUpdate]);
Update;
if ExpandIt then
TreeView.Expand(Self)
else
TreeView.Collapse(Self);
end;
end;
end;