mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-05 02:56:03 +02:00
TListView: call OnDeletion also when destroying. Issue #39391.
This commit is contained in:
parent
736bc5f5b4
commit
6eca378f9d
@ -588,7 +588,7 @@ begin
|
||||
Delete(AItem)
|
||||
else
|
||||
//if you change the code below, make sure to change it in TCustomListView.Delete as well
|
||||
if not (csDestroying in ComponentState) and Assigned(FOnDeletion) then
|
||||
if {not (csDestroying in ComponentState) and} Assigned(FOnDeletion) then
|
||||
FOnDeletion(Self, AItem);
|
||||
end;
|
||||
|
||||
@ -610,7 +610,7 @@ begin
|
||||
AItem.Delete;
|
||||
Exit;
|
||||
end;
|
||||
if not (csDestroying in ComponentState) and Assigned(FOnDeletion) then
|
||||
if {not (csDestroying in ComponentState) and} Assigned(FOnDeletion) then
|
||||
FOnDeletion(Self, AItem);
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user