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:
zeljko 2016-01-14 21:11:38 +00:00
parent 6d831b44de
commit 06164b5f5f
2 changed files with 2 additions and 5 deletions

View File

@ -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');

View File

@ -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;