Qt: bugfix for TListView.HideSelection, fixes #15103

git-svn-id: trunk@22615 -
This commit is contained in:
zeljko 2009-11-16 08:13:47 +00:00
parent f1a3cd0d73
commit 6cf3d0b52a

View File

@ -982,9 +982,14 @@ begin
case AState of
lisFocused: AIsSet := TWI = QtTreeWidget.currentItem;
lisSelected: AIsSet := QTreeWidgetItem_isSelected(TWI);
lisSelected:
begin
AIsSet := QTreeWidgetItem_isSelected(TWI);
if not AIsSet and TListView(ALV).HideSelection then
AIsSet := TWI = QtTreeWidget.currentItem;
end;
else
AIsSet := False;
AIsSet := False;
end;
Result := True;
@ -1276,6 +1281,8 @@ begin
Result := FPInts[0]
else
Result := -1;
if (Result = -1) and TListView(ALV).HideSelection then
Result := QtTreeWidget.currentRow;
end;
{------------------------------------------------------------------------------