mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-16 23:20:57 +01: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)
|
Delete(AItem)
|
||||||
else
|
else
|
||||||
//if you change the code below, make sure to change it in TCustomListView.Delete as well
|
//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);
|
FOnDeletion(Self, AItem);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -610,7 +610,7 @@ begin
|
|||||||
AItem.Delete;
|
AItem.Delete;
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
if not (csDestroying in ComponentState) and Assigned(FOnDeletion) then
|
if {not (csDestroying in ComponentState) and} Assigned(FOnDeletion) then
|
||||||
FOnDeletion(Self, AItem);
|
FOnDeletion(Self, AItem);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user