1
0
mirror of synced 2024-09-19 17:56: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,15 +26,18 @@ procedure ReadFormPos(const AFactory: TX2SettingsFactory;
begin begin
with AFactory[ASection] do with AFactory[ASection] do
try try
if ReadBool('Maximized', (AForm.WindowState = wsMaximized)) then if ValueExists('Left') then
AForm.WindowState := wsMaximized begin
else with THackCustomForm(AForm) do begin if ReadBool('Maximized', (AForm.WindowState = wsMaximized)) then
WindowState := wsNormal; AForm.WindowState := wsMaximized
Position := poDefaultPosOnly; else with THackCustomForm(AForm) do begin
Left := ReadInteger('Left', Left); WindowState := wsNormal;
Top := ReadInteger('Top', Top); Position := poDesigned;
Width := ReadInteger('Width', Width); Left := ReadInteger('Left', Left);
Height := ReadInteger('Height', Height); Top := ReadInteger('Top', Top);
Width := ReadInteger('Width', Width);
Height := ReadInteger('Height', Height);
end;
end; end;
finally finally
Free(); Free();