mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-26 07:08:14 +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;
|
end;
|
||||||
|
|
||||||
//if old and new parent is a TNotebook then remove the page from the old one
|
//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
|
begin
|
||||||
// remove from old pagelist
|
// remove from old pagelist
|
||||||
ParentNotebook := TNotebook(OldParent);
|
ParentNotebook := TNotebook(OldParent);
|
||||||
@ -63,7 +64,8 @@ begin
|
|||||||
DebugLn('[TPage.Destroy]');
|
DebugLn('[TPage.Destroy]');
|
||||||
{$endif}
|
{$endif}
|
||||||
|
|
||||||
if (Parent <> nil) and (Parent is TNotebook) then
|
if (Parent <> nil) and (Parent is TNotebook) and
|
||||||
|
not (csDestroying in Parent.ComponentState) then
|
||||||
begin
|
begin
|
||||||
{$ifdef DEBUG_NEW_NOTEBOOK}
|
{$ifdef DEBUG_NEW_NOTEBOOK}
|
||||||
DebugLn('[TPage.Destroy] FPages.Remove(Self)');
|
DebugLn('[TPage.Destroy] FPages.Remove(Self)');
|
||||||
|
Loading…
Reference in New Issue
Block a user