IDE: Prevent "Close all" button in Search in Files window hanging the IDE. Issue #38229, patch from BrunoK.

git-svn-id: trunk@64230 -
This commit is contained in:
juha 2020-12-18 22:00:45 +00:00
parent 537bc0346a
commit 97892a0c42
2 changed files with 11 additions and 4 deletions

View File

@ -38,7 +38,7 @@ unit ComponentPalette;
interface
uses
Classes, SysUtils, fgl, Laz_AVL_Tree,
Classes, SysUtils, Laz_AVL_Tree,
// LCL
LCLProc, Controls, Forms, Graphics, ComCtrls, Buttons, Menus, ExtCtrls,
// LazUtils

View File

@ -553,10 +553,17 @@ begin
end;
procedure TSearchResultsView.tbbCloseAllClick(Sender: TObject);
var
lPageIx : integer;
begin
with ResultsNoteBook do
while PageCount>0 do
ClosePage(PageCount-1);
with ResultsNoteBook do begin
lPageIx := PageCount;
while lPageIx > 0 do begin
Dec(lPageIx);
if lPageIx < PageCount then
ClosePage(lPageIx);
end;
end;
end;
{Keeps track of the Index of the Item the mouse is over, Sets ShowHint to true