mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-07 20:56:31 +02:00
rx: fixed compilaion under fpc 2.1.x
git-svn-id: trunk@10040 -
This commit is contained in:
parent
a4bd9f7713
commit
df36cf4952
@ -360,18 +360,8 @@ type
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
THackComponent = class(TComponent)
|
THackComponent = class(TComponent)
|
||||||
public
|
|
||||||
class procedure SetOtherDesigning(AComponent: TComponent; Value: Boolean);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ THackComponent }
|
|
||||||
|
|
||||||
class procedure THackComponent.SetOtherDesigning(AComponent: TComponent;
|
|
||||||
Value: Boolean);
|
|
||||||
begin
|
|
||||||
AComponent.SetDesigning(Value);
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure ReadFormPlacement(Form: TForm; IniFile: TCustomIniFile;
|
procedure ReadFormPlacement(Form: TForm; IniFile: TCustomIniFile;
|
||||||
const Section: string; LoadState, LoadPosition: Boolean);
|
const Section: string; LoadState, LoadPosition: Boolean);
|
||||||
|
|
||||||
@ -404,11 +394,11 @@ begin
|
|||||||
if (Position in [poScreenCenter , poDesktopCenter ]) and
|
if (Position in [poScreenCenter , poDesktopCenter ]) and
|
||||||
not (csDesigning in ComponentState) then
|
not (csDesigning in ComponentState) then
|
||||||
begin
|
begin
|
||||||
THackComponent.SetOtherDesigning(Form,True);
|
THackComponent(Form).SetDesigning(True);
|
||||||
try
|
try
|
||||||
Position := poDesigned;
|
Position := poDesigned;
|
||||||
finally
|
finally
|
||||||
THackComponent.SetOtherDesigning(Form,False);
|
THackComponent(Form).SetDesigning(False);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user