mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-31 11:40:33 +02:00
TListView: call OnDeletion also when destroying. Issue #39391.
(cherry picked from commit 6eca378f9d
)
This commit is contained in:
parent
728bc1691b
commit
9771fa06e7
@ -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