mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-13 11:59:25 +02:00
treeview: updating scrollbars on items addition and removal. #35738
git-svn-id: trunk@61437 -
This commit is contained in:
parent
2f9ac2ad57
commit
25a5e07eaf
@ -320,7 +320,11 @@ begin
|
||||
// we must trigger TCustomTreeView.OnDeletion event before
|
||||
// unbinding. See issue #17832.
|
||||
if Assigned(Owner) and Assigned(Owner.Owner) then
|
||||
begin
|
||||
Owner.Owner.Delete(Self);
|
||||
Include(Owner.Owner.FStates, tvsScrollbarChanged);;
|
||||
Owner.Owner.UpdateScrollbars;
|
||||
end;
|
||||
|
||||
// Remove the accessibility object too
|
||||
if Assigned(Owner) and Assigned(Owner.Owner) then
|
||||
@ -2339,6 +2343,8 @@ begin
|
||||
lAccessibleObject.DataObject := Result;
|
||||
end;
|
||||
finally
|
||||
Include(FOwner.FStates, tvsScrollbarChanged);
|
||||
FOwner.UpdateScrollbars;
|
||||
// this construction creates nicer exception output
|
||||
if not ok then
|
||||
Result.Free;
|
||||
|
Loading…
Reference in New Issue
Block a user