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:
maxim 2016-01-18 23:06:16 +00:00
parent 67fc6eb2c8
commit 2189723d75
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;