mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-06 17:18:17 +02:00
LCL: fixed compiling with DebugDisableAutoSizing, bug #17817
git-svn-id: trunk@28059 -
This commit is contained in:
parent
e7da031bee
commit
1c7a2d7963
@ -179,7 +179,7 @@ var
|
||||
btn: TPanelButton;
|
||||
aButton: TPanelBitBtn;
|
||||
begin
|
||||
DisableAutoSizing;
|
||||
DisableAutoSizing{$IFDEF DebugDisableAutoSizing}('TCustomButtonPanel.DoShowButtons'){$ENDIF};
|
||||
|
||||
for btn := Low(btn) to High(btn) do
|
||||
begin
|
||||
@ -204,7 +204,7 @@ begin
|
||||
|
||||
UpdateButtonOrder;
|
||||
UpdateButtonLayout;
|
||||
EnableAutoSizing;
|
||||
EnableAutoSizing{$IFDEF DebugDisableAutoSizing}('TCustomButtonPanel.DoShowButtons'){$ENDIF};
|
||||
end;
|
||||
|
||||
procedure TCustomButtonPanel.SetShowButtons(Value: TPanelButtons);
|
||||
@ -221,7 +221,7 @@ procedure TCustomButtonPanel.DoShowGlyphs;
|
||||
var
|
||||
btn: TPanelButton;
|
||||
begin
|
||||
DisableAutoSizing;
|
||||
DisableAutoSizing{$IFDEF DebugDisableAutoSizing}('TCustomButtonPanel.DoShowGlyphs'){$ENDIF};
|
||||
for btn := Low(btn) to High(btn) do
|
||||
begin
|
||||
if FButtons[btn] = nil then Continue;
|
||||
@ -235,7 +235,7 @@ begin
|
||||
FButtons[btn].Glyph.Assign(nil);
|
||||
end;
|
||||
end;
|
||||
EnableAutoSizing;
|
||||
EnableAutoSizing{$IFDEF DebugDisableAutoSizing}('TCustomButtonPanel.DoShowGlyphs'){$ENDIF};
|
||||
end;
|
||||
|
||||
procedure TCustomButtonPanel.SetShowGlyphs(Value: TPanelButtons);
|
||||
@ -354,14 +354,14 @@ end;
|
||||
|
||||
procedure TCustomButtonPanel.SetAlign(Value: TAlign);
|
||||
begin
|
||||
DisableAutoSizing;
|
||||
DisableAutoSizing{$IFDEF DebugDisableAutoSizing}('TCustomButtonPanel.SetAlign'){$ENDIF};
|
||||
try
|
||||
inherited SetAlign(Value);
|
||||
UpdateButtonLayout;
|
||||
UpdateBevel;
|
||||
UpdateSizes;
|
||||
finally
|
||||
EnableAutoSizing;
|
||||
EnableAutoSizing{$IFDEF DebugDisableAutoSizing}('TCustomButtonPanel.SetAlign'){$ENDIF};
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -409,7 +409,7 @@ begin
|
||||
Exit;
|
||||
end;
|
||||
|
||||
DisableAutoSizing;
|
||||
DisableAutoSizing{$IFDEF DebugDisableAutoSizing}('TCustomButtonPanel.SetShowBevel'){$ENDIF};
|
||||
try
|
||||
FBevel := TBevel.Create(Self);
|
||||
FBevel.Parent := Self;
|
||||
@ -417,7 +417,7 @@ begin
|
||||
|
||||
UpdateBevel;
|
||||
finally
|
||||
EnableAutoSizing;
|
||||
EnableAutoSizing{$IFDEF DebugDisableAutoSizing}('TCustomButtonPanel.SetShowBevel'){$ENDIF};
|
||||
end;
|
||||
end;
|
||||
|
||||
|
@ -3376,7 +3376,7 @@ var
|
||||
OldSide: TAnchorSideReference;
|
||||
begin
|
||||
if FSide=AValue then exit;
|
||||
FOwner.DisableAutoSizing;
|
||||
FOwner.DisableAutoSizing{$IFDEF DebugDisableAutoSizing}('TAnchorSide.SetSide'){$ENDIF};
|
||||
if AValue=asrCenter then begin
|
||||
OldSide:=FSide;
|
||||
FixCenterAnchoring;
|
||||
@ -3386,7 +3386,7 @@ begin
|
||||
FOwner.AnchorSideChanged(Self);
|
||||
if FControl<>nil then
|
||||
FControl.ForeignAnchorSideChanged(Self,ascoChangeSide);
|
||||
FOwner.EnableAutoSizing;
|
||||
FOwner.EnableAutoSizing{$IFDEF DebugDisableAutoSizing}('TAnchorSide.SetSide'){$ENDIF};
|
||||
end;
|
||||
|
||||
function TAnchorSide.GetOwner: TPersistent;
|
||||
|
@ -509,7 +509,7 @@ begin
|
||||
if (FloatingClass<>nil) and (FloatingClass<>TWinControlClass(ClassType)) then
|
||||
begin
|
||||
Result := TWinControl(FloatingClass.NewInstance);
|
||||
Result.DisableAutoSizing;
|
||||
Result.DisableAutoSizing{$IFDEF DebugDisableAutoSizing}('TControl.CreateFloatingDockSite'){$ENDIF};
|
||||
Result.Create(Self);
|
||||
// resize with minimal resizes
|
||||
NewClientWidth:=Bounds.Right-Bounds.Left;
|
||||
@ -519,7 +519,7 @@ begin
|
||||
Result.SetBounds(Bounds.Left,Bounds.Top,NewWidth,NewHeight);
|
||||
Result.SetClientSize(Point(NewClientWidth,NewClientHeight));
|
||||
debugln('TControl.CreateFloatingDockSite A ',DbgSName(Self),' ',DbgSName(Result),' ',dbgs(Result.BoundsRect));
|
||||
Result.EnableAutoSizing;
|
||||
Result.EnableAutoSizing{$IFDEF DebugDisableAutoSizing}('TControl.CreateFloatingDockSite'){$ENDIF};
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -3807,7 +3807,7 @@ begin
|
||||
RaiseAlreadyDocking;
|
||||
|
||||
// dock
|
||||
DisableAutoSizing;
|
||||
DisableAutoSizing{$IFDEF DebugDisableAutoSizing}('TControl.Dock'){$ENDIF};
|
||||
Include(FControlState, csDocking);
|
||||
try
|
||||
OldHostDockSite:=HostDockSite;
|
||||
@ -3837,7 +3837,7 @@ begin
|
||||
NewDockSite.FDockClients.Remove(Self);
|
||||
Exclude(FControlState, csDocking);
|
||||
end;
|
||||
EnableAutoSizing;
|
||||
EnableAutoSizing{$IFDEF DebugDisableAutoSizing}('TControl.Dock'){$ENDIF};
|
||||
|
||||
//DebugLn(['TControl.Dock END ',DbgSName(Self),' ',DbgSName(HostDockSite)]);
|
||||
end;
|
||||
@ -3861,9 +3861,9 @@ var
|
||||
NewPosition: TPoint;
|
||||
begin
|
||||
if DropControl<>nil then
|
||||
DropControl.DisableAutoSizing;
|
||||
DropControl.DisableAutoSizing{$IFDEF DebugDisableAutoSizing}('TControl.ManualDock DropControl'){$ENDIF};
|
||||
if NewDockSite<>nil then
|
||||
NewDockSite.DisableAutoSizing;
|
||||
NewDockSite.DisableAutoSizing{$IFDEF DebugDisableAutoSizing}('TControl.ManualDock NewDockSite'){$ENDIF};
|
||||
if (NewDockSite=nil) then begin
|
||||
// undock / float this control
|
||||
// float the control at the same screen position
|
||||
@ -3919,9 +3919,9 @@ begin
|
||||
end;
|
||||
end;
|
||||
if NewDockSite<>nil then
|
||||
NewDockSite.EnableAutoSizing;
|
||||
NewDockSite.EnableAutoSizing{$IFDEF DebugDisableAutoSizing}('TControl.ManualDock NewDockSite'){$ENDIF};
|
||||
if DropControl<>nil then
|
||||
DropControl.EnableAutoSizing;
|
||||
DropControl.EnableAutoSizing{$IFDEF DebugDisableAutoSizing}('TControl.ManualDock DropControl'){$ENDIF};
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
@ -3938,7 +3938,7 @@ var
|
||||
FloatHost: TWinControl;
|
||||
begin
|
||||
DebugLn(['TControl.ManualFloat ',DbgSName(Self)]);
|
||||
DisableAutoSizing;
|
||||
DisableAutoSizing{$IFDEF DebugDisableAutoSizing}('TControl.ManualFloat'){$ENDIF};
|
||||
// undock from old host dock site
|
||||
if HostDockSite = nil then
|
||||
begin
|
||||
@ -3966,7 +3966,7 @@ begin
|
||||
else
|
||||
Dock(nil, TheScreenRect);
|
||||
end;
|
||||
EnableAutoSizing;
|
||||
EnableAutoSizing{$IFDEF DebugDisableAutoSizing}('TControl.ManualFloat'){$ENDIF};
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
@ -3983,7 +3983,7 @@ var
|
||||
begin
|
||||
Result := False;
|
||||
|
||||
DisableAutoSizing;
|
||||
DisableAutoSizing{$IFDEF DebugDisableAutoSizing}('TControl.ReplaceDockedControl'){$ENDIF};
|
||||
OldDockSite := Control.HostDockSite;
|
||||
if (OldDockSite<>nil) and (not HostDockSiteManagerAvailable(OldDockSite)) then
|
||||
exit;
|
||||
@ -3997,7 +3997,7 @@ begin
|
||||
OldDockSite.DockManager.SetReplacingControl(nil);
|
||||
end;
|
||||
Result:=Control.ManualDock(NewDockSite,DropControl,ControlSide);
|
||||
EnableAutoSizing;
|
||||
EnableAutoSizing{$IFDEF DebugDisableAutoSizing}('TControl.ReplaceDockedControl'){$ENDIF};
|
||||
end;
|
||||
|
||||
procedure TControl.AddHandlerOnResize(const OnResizeEvent: TNotifyEvent;
|
||||
@ -4890,11 +4890,11 @@ begin
|
||||
if FBiDiMode=AValue then exit;
|
||||
FBiDiMode:=AValue;
|
||||
FParentBiDiMode := False;
|
||||
DisableAutoSizing;
|
||||
DisableAutoSizing{$IFDEF DebugDisableAutoSizing}('TControl.SetBiDiMode'){$ENDIF};
|
||||
try
|
||||
Perform(CM_BIDIMODECHANGED, 0, 0); // see TWinControl.CMBiDiModeChanged
|
||||
finally
|
||||
EnableAutoSizing;
|
||||
EnableAutoSizing{$IFDEF DebugDisableAutoSizing}('TControl.SetBiDiMode'){$ENDIF};
|
||||
end;
|
||||
end;
|
||||
|
||||
|
@ -37,7 +37,7 @@ var
|
||||
begin
|
||||
Result := False;
|
||||
Form := TForm(TForm.NewInstance);
|
||||
Form.DisableAutoSizing;
|
||||
Form.DisableAutoSizing{$IFDEF DebugDisableAutoSizing}('ShowInputDialog'){$ENDIF};
|
||||
Form.CreateNew(nil, 0);
|
||||
with Form do
|
||||
begin
|
||||
@ -93,7 +93,7 @@ begin
|
||||
|
||||
// upon show, the edit control will be focused for editing, because it's
|
||||
// the first in the tab order
|
||||
Form.EnableAutoSizing;
|
||||
Form.EnableAutoSizing{$IFDEF DebugDisableAutoSizing}('ShowInputDialog'){$ENDIF};
|
||||
if ShowModal = mrOk then
|
||||
begin
|
||||
Value := Edit.Text;
|
||||
|
Loading…
Reference in New Issue
Block a user