mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-22 04:59:26 +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
|
// we must trigger TCustomTreeView.OnDeletion event before
|
||||||
// unbinding. See issue #17832.
|
// unbinding. See issue #17832.
|
||||||
if Assigned(Owner) and Assigned(Owner.Owner) then
|
if Assigned(Owner) and Assigned(Owner.Owner) then
|
||||||
|
begin
|
||||||
Owner.Owner.Delete(Self);
|
Owner.Owner.Delete(Self);
|
||||||
|
Include(Owner.Owner.FStates, tvsScrollbarChanged);;
|
||||||
|
Owner.Owner.UpdateScrollbars;
|
||||||
|
end;
|
||||||
|
|
||||||
// Remove the accessibility object too
|
// Remove the accessibility object too
|
||||||
if Assigned(Owner) and Assigned(Owner.Owner) then
|
if Assigned(Owner) and Assigned(Owner.Owner) then
|
||||||
@ -2339,6 +2343,8 @@ begin
|
|||||||
lAccessibleObject.DataObject := Result;
|
lAccessibleObject.DataObject := Result;
|
||||||
end;
|
end;
|
||||||
finally
|
finally
|
||||||
|
Include(FOwner.FStates, tvsScrollbarChanged);
|
||||||
|
FOwner.UpdateScrollbars;
|
||||||
// this construction creates nicer exception output
|
// this construction creates nicer exception output
|
||||||
if not ok then
|
if not ok then
|
||||||
Result.Free;
|
Result.Free;
|
||||||
|
Loading…
Reference in New Issue
Block a user