mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-14 18:12:05 +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
|
end else
|
||||||
lblFilterVTInfo.Caption := '';
|
lblFilterVTInfo.Caption := '';
|
||||||
|
|
||||||
// Needs a refresh to apply visible states
|
// RootNode.TotalHeight needs to be recalculated so the scrollbar has the correct
|
||||||
VT.Refresh;
|
// range, ignoring hidden nodes.
|
||||||
VT.UpdateScrollBars(True);
|
// 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;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user