mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 16:19:36 +02:00
Merged revision(s) 51287 #06164b5f5f from trunk:
TListFilterEdit: removed LCLQt workaround. issue #29385 Qt: unset selection when itemindex is changed. issue #29385 ........ git-svn-id: branches/fixes_1_6@51329 -
This commit is contained in:
parent
67fc6eb2c8
commit
2189723d75
@ -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