mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-07 03:20:38 +02:00
win32: invalidate pagecontrol client rectangle after the page removing (fixes issue #0014625)
git-svn-id: trunk@25122 -
This commit is contained in:
parent
538910a1bd
commit
340c30848d
@ -111,7 +111,7 @@ var
|
||||
ParentNotebook: TCustomNotebook;
|
||||
i: integer;
|
||||
begin
|
||||
if (AParent=Parent) or (pfInserting in FFlags) then Exit;
|
||||
if (AParent = Parent) or (pfInserting in FFlags) then Exit;
|
||||
CheckNewParent(AParent);
|
||||
OldParent := Parent;
|
||||
if (OldParent <> AParent) and (OldParent <> nil) and
|
||||
@ -129,7 +129,7 @@ begin
|
||||
if (OldParent <> AParent) and (Parent <> nil) and (Parent is TCustomNotebook) then
|
||||
begin
|
||||
// add to new pagelist
|
||||
ParentNotebook:=TCustomNotebook(Parent);
|
||||
ParentNotebook := TCustomNotebook(Parent);
|
||||
i := ParentNotebook.PageList.IndexOf(Self);
|
||||
if i < 0 then
|
||||
ParentNotebook.InsertPage(Self, ParentNotebook.PageCount);
|
||||
|
@ -314,8 +314,10 @@ begin
|
||||
PageIndex := TCustomPage(AWinControl).PageIndex;
|
||||
RealIndex := TWin32WSCustomNotebook.GetPageRealIndex(TCustomNotebook(AWinControl.Parent), PageIndex);
|
||||
if RealIndex <> -1 then
|
||||
Windows.SendMessage(PageControlHandle, TCM_DELETEITEM,
|
||||
Windows.WPARAM(RealIndex), 0);
|
||||
begin
|
||||
Windows.SendMessage(PageControlHandle, TCM_DELETEITEM, Windows.WPARAM(RealIndex), 0);
|
||||
AWinControl.Parent.InvalidateClientRectCache(False);
|
||||
end;
|
||||
end;
|
||||
TWSWinControlClass(ClassParent).DestroyHandle(AWinControl);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user