Skip to content

Commit

Permalink
Wrap filtering grid data in BeginUpdate/EndUpdate, so it might get a …
Browse files Browse the repository at this point in the history
  • Loading branch information
ansgarbecker committed Dec 14, 2018
1 parent 76825bc commit 94ae69e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions source/main.pas
Original file line number Diff line number Diff line change
Expand Up @@ -7551,6 +7551,7 @@ procedure TMainForm.ApplyVTFilter(FromTimer: Boolean);
editFilterVT.RightButton.ImageIndex := 150;
editFilterVT.Repaint;

VT.BeginUpdate;
while Assigned(Node) do begin
// Don't filter anything if the filter text is empty
match := rx.Expression = '';
Expand All @@ -7566,6 +7567,7 @@ procedure TMainForm.ApplyVTFilter(FromTimer: Boolean);
inc(VisibleCount);
Node := VT.GetNext(Node);
end;
VT.EndUpdate;
if rx.Expression <> '' then begin
lblFilterVTInfo.Caption := f_('%0:d out of %1:d matching. %2:d hidden.', [VisibleCount, VT.RootNodeCount, VT.RootNodeCount - VisibleCount]);
end else
Expand Down

0 comments on commit 94ae69e

Please sign in to comment.