mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-17 04:29:25 +02:00
win32(ce): fix deletion of notebook/pagecontrol page by RemovePage
git-svn-id: trunk@12519 -
This commit is contained in:
parent
c114b0811b
commit
6ccb6125c6
@ -236,6 +236,10 @@ implementation
|
||||
uses
|
||||
Forms, LMessages, ShellAPI;
|
||||
|
||||
type
|
||||
TCustomPageAccess = class(TCustomPage)
|
||||
end;
|
||||
|
||||
function IsNotebookGroupFocused(const ANotebook: TCustomNotebook): boolean;
|
||||
var
|
||||
lNotebookHandle, lWindow: HWND;
|
||||
@ -329,8 +333,10 @@ var
|
||||
PageIndex: integer;
|
||||
PageControlHandle: HWND;
|
||||
begin
|
||||
// remove tab from pagecontrol
|
||||
if (AWinControl.Parent <> nil) and (AWinControl.Parent.HandleAllocated) then
|
||||
// remove tab from pagecontrol only if not pfRemoving is set
|
||||
// if pfRemoving is set then Tab has been deleted by RemovePage
|
||||
if (AWinControl.Parent <> nil) and (AWinControl.Parent.HandleAllocated) and
|
||||
not (pfRemoving in TCustomPageAccess(AWinControl).Flags) then
|
||||
begin
|
||||
PageControlHandle := AWinControl.Parent.Handle;
|
||||
PageIndex := TCustomPage(AWinControl).PageIndex;
|
||||
|
@ -223,6 +223,10 @@ implementation
|
||||
uses
|
||||
LMessages;
|
||||
|
||||
type
|
||||
TCustomPageAccess = class(TCustomPage)
|
||||
end;
|
||||
|
||||
function IsNotebookGroupFocused(const ANotebook: TCustomNotebook): boolean;
|
||||
var
|
||||
lNotebookHandle, lWindow: HWND;
|
||||
@ -309,8 +313,10 @@ var
|
||||
PageIndex: integer;
|
||||
PageControlHandle: HWND;
|
||||
begin
|
||||
// remove tab from pagecontrol
|
||||
if (AWinControl.Parent <> nil) and (AWinControl.Parent.HandleAllocated) then
|
||||
// remove tab from pagecontrol only if not pfRemoving is set
|
||||
// if pfRemoving is set then Tab has been deleted by RemovePage
|
||||
if (AWinControl.Parent <> nil) and (AWinControl.Parent.HandleAllocated) and
|
||||
not (pfRemoving in TCustomPageAccess(AWinControl).Flags) then
|
||||
begin
|
||||
PageControlHandle := AWinControl.Parent.Handle;
|
||||
PageIndex := TCustomPage(AWinControl).PageIndex;
|
||||
|
Loading…
Reference in New Issue
Block a user