mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-12 10:59:20 +02:00
TListFilterEdit: removed LCLQt workaround. issue #29385
Qt: unset selection when itemindex is changed. issue #29385 git-svn-id: trunk@51287 -
This commit is contained in:
parent
6d831b44de
commit
06164b5f5f
@ -327,11 +327,6 @@ begin
|
||||
fFilteredListbox.Selected[i] := True;
|
||||
end else
|
||||
begin
|
||||
{$IFDEF LCLQt}
|
||||
// With LCL-Qt setting the ItemIndex does not clear selection.
|
||||
for i := 0 to fFilteredListbox.Count - 1 do
|
||||
fFilteredListbox.Selected[i] := False;
|
||||
{$ENDIF LCLQt}
|
||||
fFilteredListbox.ItemIndex := AIndex;
|
||||
end;
|
||||
Assert(fFilteredListbox.ItemFullyVisible(AIndex), 'TListFilterEdit.MoveTo: Item not fully visible');
|
||||
|
@ -626,6 +626,8 @@ class procedure TQtWSCustomListBox.SetItemIndex(const ACustomListBox: TCustomLis
|
||||
begin
|
||||
if not WSCheckHandleAllocated(ACustomListBox, 'SetItemIndex') then
|
||||
Exit;
|
||||
if TQtListWidget(ACustomListBox.Handle).currentRow <> AIndex then
|
||||
TQtListWidget(ACustomListBox.Handle).clearSelection;
|
||||
TQtListWidget(ACustomListBox.Handle).setCurrentRow(AIndex);
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user