mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-27 00:02:48 +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
|
uses
|
||||||
Forms, LMessages, ShellAPI;
|
Forms, LMessages, ShellAPI;
|
||||||
|
|
||||||
|
type
|
||||||
|
TCustomPageAccess = class(TCustomPage)
|
||||||
|
end;
|
||||||
|
|
||||||
function IsNotebookGroupFocused(const ANotebook: TCustomNotebook): boolean;
|
function IsNotebookGroupFocused(const ANotebook: TCustomNotebook): boolean;
|
||||||
var
|
var
|
||||||
lNotebookHandle, lWindow: HWND;
|
lNotebookHandle, lWindow: HWND;
|
||||||
@ -329,8 +333,10 @@ var
|
|||||||
PageIndex: integer;
|
PageIndex: integer;
|
||||||
PageControlHandle: HWND;
|
PageControlHandle: HWND;
|
||||||
begin
|
begin
|
||||||
// remove tab from pagecontrol
|
// remove tab from pagecontrol only if not pfRemoving is set
|
||||||
if (AWinControl.Parent <> nil) and (AWinControl.Parent.HandleAllocated) then
|
// 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
|
begin
|
||||||
PageControlHandle := AWinControl.Parent.Handle;
|
PageControlHandle := AWinControl.Parent.Handle;
|
||||||
PageIndex := TCustomPage(AWinControl).PageIndex;
|
PageIndex := TCustomPage(AWinControl).PageIndex;
|
||||||
|
@ -223,6 +223,10 @@ implementation
|
|||||||
uses
|
uses
|
||||||
LMessages;
|
LMessages;
|
||||||
|
|
||||||
|
type
|
||||||
|
TCustomPageAccess = class(TCustomPage)
|
||||||
|
end;
|
||||||
|
|
||||||
function IsNotebookGroupFocused(const ANotebook: TCustomNotebook): boolean;
|
function IsNotebookGroupFocused(const ANotebook: TCustomNotebook): boolean;
|
||||||
var
|
var
|
||||||
lNotebookHandle, lWindow: HWND;
|
lNotebookHandle, lWindow: HWND;
|
||||||
@ -309,8 +313,10 @@ var
|
|||||||
PageIndex: integer;
|
PageIndex: integer;
|
||||||
PageControlHandle: HWND;
|
PageControlHandle: HWND;
|
||||||
begin
|
begin
|
||||||
// remove tab from pagecontrol
|
// remove tab from pagecontrol only if not pfRemoving is set
|
||||||
if (AWinControl.Parent <> nil) and (AWinControl.Parent.HandleAllocated) then
|
// 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
|
begin
|
||||||
PageControlHandle := AWinControl.Parent.Handle;
|
PageControlHandle := AWinControl.Parent.Handle;
|
||||||
PageIndex := TCustomPage(AWinControl).PageIndex;
|
PageIndex := TCustomPage(AWinControl).PageIndex;
|
||||||
|
Loading…
Reference in New Issue
Block a user