mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-31 21:12:31 +02:00
LCL: TNoteBook: Fixed TNotebook fires OnBeforeShow for destroying pages. Issue #32863. Patch by Rik van Kekem
git-svn-id: trunk@56811 -
This commit is contained in:
parent
2c51aaf235
commit
41f5452879
@ -33,7 +33,8 @@ begin
|
||||
end;
|
||||
|
||||
//if old and new parent is a TNotebook then remove the page from the old one
|
||||
if (OldParent <> nil) and (OldParent is TNotebook) then
|
||||
if (OldParent <> nil) and (OldParent is TNotebook) and
|
||||
not (csDestroying in OldParent.ComponentState) then
|
||||
begin
|
||||
// remove from old pagelist
|
||||
ParentNotebook := TNotebook(OldParent);
|
||||
@ -63,7 +64,8 @@ begin
|
||||
DebugLn('[TPage.Destroy]');
|
||||
{$endif}
|
||||
|
||||
if (Parent <> nil) and (Parent is TNotebook) then
|
||||
if (Parent <> nil) and (Parent is TNotebook) and
|
||||
not (csDestroying in Parent.ComponentState) then
|
||||
begin
|
||||
{$ifdef DEBUG_NEW_NOTEBOOK}
|
||||
DebugLn('[TPage.Destroy] FPages.Remove(Self)');
|
||||
|
Loading…
Reference in New Issue
Block a user