From ce82b57b84fdb7503cfd36e42f5f03bc9b61023e Mon Sep 17 00:00:00 2001 From: zeljko Date: Sun, 30 Oct 2011 12:40:34 +0000 Subject: [PATCH] Qt: simplified selection code for TQtWSCustomListBox by using Selected[] property git-svn-id: trunk@33174 - --- lcl/interfaces/qt/qtwsstdctrls.pp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lcl/interfaces/qt/qtwsstdctrls.pp b/lcl/interfaces/qt/qtwsstdctrls.pp index 95e7695918..c1158fba5c 100644 --- a/lcl/interfaces/qt/qtwsstdctrls.pp +++ b/lcl/interfaces/qt/qtwsstdctrls.pp @@ -582,14 +582,11 @@ class procedure TQtWSCustomListBox.SelectItem(const ACustomListBox: TCustomListB AIndex: integer; ASelected: boolean); var QtListWidget: TQtListWidget; - ListItem: QListWidgetItemH; begin if not WSCheckHandleAllocated(ACustomListBox, 'SelectItem') then Exit; QtListWidget := TQtListWidget(ACustomListBox.Handle); - ListItem := QtListWidget.getItem(AIndex); - if ListItem <> nil then - QtListWidget.setItemSelected(ListItem, ASelected); + QtListWidget.Selected[AIndex] := ASelected; end; {------------------------------------------------------------------------------