1
0
mirror of synced 2024-09-19 09:46:09 +00:00

Fixed: form position is not changed when no settings are available yet

This commit is contained in:
Mark van Renswoude 2005-03-14 19:17:34 +00:00
parent 396934b857
commit 8374bc2fee

View File

@ -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;