mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-27 00:40:18 +02:00
LCL: TListView fixed Delphi compatibility for Selected property when MultiSelect is enabled.issue #16773
git-svn-id: trunk@33128 -
This commit is contained in:
parent
254f24d18c
commit
319d2fbb8f
@ -974,8 +974,12 @@ function TCustomListView.GetSelection: TListItem;
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
if not OwnerData then begin
|
||||
if not (lffSelectedValid in FFlags) then
|
||||
if not OwnerData then
|
||||
begin
|
||||
{according to Delphi docs
|
||||
we always must return first selected item, not the last selected one
|
||||
see issue #16773}
|
||||
if not (lffSelectedValid in FFlags) or MultiSelect then
|
||||
begin
|
||||
FSelected := nil;
|
||||
for i := 0 to Items.Count - 1 do
|
||||
|
Loading…
Reference in New Issue
Block a user