mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
Work around wrongly calculated scrollbar range in host lists. Ignores hidden (= filtered) nodes now.
This commit is contained in:
@ -7037,9 +7037,18 @@ begin
|
||||
end else
|
||||
lblFilterVTInfo.Caption := '';
|
||||
|
||||
// Needs a refresh to apply visible states
|
||||
VT.Refresh;
|
||||
VT.UpdateScrollBars(True);
|
||||
// RootNode.TotalHeight needs to be recalculated so the scrollbar has the correct
|
||||
// range, ignoring hidden nodes.
|
||||
// Similar to what is done by VT.FixupTotalHeight() which doesn't work
|
||||
// for some reason if called from within VT.UpdateVerticalScrollBar()
|
||||
VT.RootNode.TotalHeight := 0;
|
||||
Node := VT.GetFirst;
|
||||
while Assigned(Node) do begin
|
||||
if vsVisible in Node.States then
|
||||
Inc(VT.RootNode.TotalHeight, Node.TotalHeight);
|
||||
Node := Node.NextSibling;
|
||||
end;
|
||||
VT.UpdateVerticalScrollBar(True);
|
||||
end;
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user