mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-05 23:32:33 +02:00
LCL: Don't get TListView OwnerData with ItemIndex -1. Issue #30320, patch from Michl.
git-svn-id: trunk@52591 -
This commit is contained in:
parent
2771d74068
commit
91780eb6f7
@ -342,11 +342,9 @@ begin
|
||||
if not OwnerData and (FSelected = Item) then
|
||||
InvalidateSelected
|
||||
else if OwnerData and (nm^.iItem=FSelectedIdx) then
|
||||
begin
|
||||
FSelectedIdx:=-1;
|
||||
InvalidateSelected;
|
||||
end;
|
||||
DoSelectItem(Item, False);
|
||||
if nm^.iItem > -1 then
|
||||
DoSelectItem(Item, False);
|
||||
end else
|
||||
begin
|
||||
FSelected := Item;
|
||||
@ -356,7 +354,8 @@ begin
|
||||
FSelectedIdx:=nm^.iItem;
|
||||
end;
|
||||
//DebugLn('TCustomListView.CNNotify FSelected=',dbgs(FSelected));
|
||||
DoSelectItem(Item, True);
|
||||
if nm^.iItem > -1 then
|
||||
DoSelectItem(Item, True);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user