mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-15 04:29:27 +02:00
LCL: TNotebook: fixed updating FShowing on switching PageIndex by user, fixes invisible controls at designtime
git-svn-id: trunk@15937 -
This commit is contained in:
parent
af49852343
commit
3af4740453
@ -1498,6 +1498,7 @@ begin
|
||||
begin
|
||||
// redirect messages to designer
|
||||
Form := GetParentForm(Self);
|
||||
//debugln(['TControl.WndProc ',dbgsname(Self)]);
|
||||
if (Form <> nil) and (Form.Designer <> nil)
|
||||
and Form.Designer.IsDesignMsg(Self,TheMessage) then begin
|
||||
Exit;
|
||||
|
@ -865,6 +865,7 @@ var
|
||||
FocusHandle : HWND;
|
||||
MenuItem : TMenuItem;
|
||||
begin
|
||||
//debugln(['TCustomForm.WndProc ',dbgsname(Self)]);
|
||||
with TheMessage do
|
||||
case Msg of
|
||||
LM_ACTIVATE, LM_SETFOCUS, LM_KILLFOCUS:
|
||||
|
@ -780,6 +780,7 @@ end;
|
||||
procedure TCustomNotebook.CNNotify(var Message: TLMNotify);
|
||||
var
|
||||
OldPageIndex: LongInt;
|
||||
APage: TCustomPage;
|
||||
begin
|
||||
with Message do
|
||||
case NMHdr^.code of
|
||||
@ -801,6 +802,11 @@ begin
|
||||
//DebugLn(['TCustomNotebook.CNNotify ',DbgSName(Page[PageIndex]),' ',Page[PageIndex].Visible]);
|
||||
ResizeDelayedAutoSizeChildren;
|
||||
Change;
|
||||
if FPageIndex>=0 then begin
|
||||
APage:=Page[FPageIndex];
|
||||
// update FShowing
|
||||
APage.UpdateShowing;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
@ -208,7 +208,6 @@ begin
|
||||
if Parent is TCustomNotebook then
|
||||
begin
|
||||
Result := (PageIndex = TCustomNotebook(Parent).PageIndex);
|
||||
//if Name='FormEditorPage' then DebugLn(['TCustomPage.IsControlVisible PageIndex=',PageIndex,' Parent.PageIndex=',TCustomNotebook(Parent).PageIndex]);
|
||||
end else begin
|
||||
Result := inherited IsControlVisible;
|
||||
end;
|
||||
|
@ -5580,6 +5580,7 @@ begin
|
||||
if not (csDestroying in ComponentState) then
|
||||
AControl.RequestAlign;
|
||||
Perform(CM_CONTROLCHANGE, WParam(AControl), LParam(True));
|
||||
//debugln(['TWinControl.InsertControl ',DbgSName(Self),' ',csDesigning in ComponentState,' ',DbgSName(AControl),' ',csDesigning in AControl.ComponentState]);
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user