mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-09 16:58:49 +02:00
LazControls: Prevent a ListBox flashing when ListFilterEdit is updated. Move BeginUpdate up. Issue #40279, patch by n7800.
This commit is contained in:
parent
62acfd9909
commit
d0671c7447
@ -200,8 +200,9 @@ begin
|
||||
clb:=Nil;
|
||||
if fFilteredListbox is TCustomCheckListBox then
|
||||
clb:=TCustomCheckListBox(fFilteredListbox);
|
||||
fFilteredListbox.Clear;
|
||||
fFilteredListbox.Items.BeginUpdate;
|
||||
try
|
||||
fFilteredListbox.Clear;
|
||||
for i:=0 to fSortedData.Count-1 do begin
|
||||
s:=fSortedData[i];
|
||||
ListInd:=fFilteredListbox.Items.AddObject(s, fSortedData.Objects[i]);
|
||||
@ -214,7 +215,9 @@ begin
|
||||
clb.Checked[ListInd]:=fCheckedItems.Contains(s);
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
fFilteredListbox.Items.EndUpdate;
|
||||
end;
|
||||
if FSimpleSelection and (fSortedData.Count > 0) then begin
|
||||
if (Text<>'') then begin
|
||||
MoveTo(0, true);
|
||||
|
Loading…
Reference in New Issue
Block a user