Fixed: form position is not changed when no settings are available yet
This commit is contained in:
parent
396934b857
commit
8374bc2fee
@ -26,16 +26,19 @@ procedure ReadFormPos(const AFactory: TX2SettingsFactory;
|
||||
begin
|
||||
with AFactory[ASection] do
|
||||
try
|
||||
if ValueExists('Left') then
|
||||
begin
|
||||
if ReadBool('Maximized', (AForm.WindowState = wsMaximized)) then
|
||||
AForm.WindowState := wsMaximized
|
||||
else with THackCustomForm(AForm) do begin
|
||||
WindowState := wsNormal;
|
||||
Position := poDefaultPosOnly;
|
||||
Position := poDesigned;
|
||||
Left := ReadInteger('Left', Left);
|
||||
Top := ReadInteger('Top', Top);
|
||||
Width := ReadInteger('Width', Width);
|
||||
Height := ReadInteger('Height', Height);
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
Free();
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user