Skip to content
Permalink
Browse files

Issue #895: remove wrong comment, and duplicated check for empty expr…

…ession
  • Loading branch information
ansgarbecker committed Feb 27, 2020
1 parent 6c51de4 commit 74ea786201241847d398d15f6f351ca789de05bd
Showing with 4 additions and 7 deletions.
  1. +4 −7 source/main.pas
@@ -7996,15 +7996,12 @@ procedure TMainForm.ApplyVTFilter(FromTimer: Boolean);
rx := TRegExpr.Create;
rx.ModifierI := True;
rx.Expression := editFilterVT.Text;
if rx.Expression <> '' then
try
rx.Exec('abc'); // here should be editFilterVT.Text?
if rx.Expression <> '' then try
rx.Exec('abc');
except
on E:ERegExpr do begin
if rx.Expression <> '' then begin
LogSQL('Filter text is not a valid regular expression: "'+rx.Expression+'"', lcError);
rx.Expression := '';
end;
LogSQL('Filter text is not a valid regular expression: "'+rx.Expression+'"', lcError);
rx.Expression := '';
end;
end;
VisibleCount := 0;

0 comments on commit 74ea786

Please sign in to comment.
You can’t perform that action at this time.