X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Feditor%2Ff_main.pas;h=ab72ebed255b1f37ebdc343f7d1b789e295fd384;hb=a26127e6f072c41c76ea5ce4f15fb768286f0ea8;hp=d429811c6222c2066fb0ab2a8f4acde2e9aa11ce;hpb=3dc2fe6b3d29cd54425db8f590e922f2dce50e99;p=d2df-editor.git diff --git a/src/editor/f_main.pas b/src/editor/f_main.pas index d429811..ab72ebe 100644 --- a/src/editor/f_main.pas +++ b/src/editor/f_main.pas @@ -1795,6 +1795,7 @@ procedure FullClear(); begin RemoveSelectFromObjects(); ClearMap(); + LoadSky(gMapInfo.SkyName); UndoBuffer := nil; slInvalidTextures.Clear(); MapCheckForm.lbErrorList.Clear(); @@ -2599,6 +2600,14 @@ begin config := TConfig.CreateFile(EditorDir+'Editor.cfg'); + if config.ReadInt('Editor', 'XPos', -1) = -1 then + Position := poDesktopCenter + else begin + Left := config.ReadInt('Editor', 'XPos', Left); + Top := config.ReadInt('Editor', 'YPos', Top); + Width := config.ReadInt('Editor', 'Width', Width); + Height := config.ReadInt('Editor', 'Height', Height); + end; if config.ReadBool('Editor', 'Maximize', False) then WindowState := wsMaximized; ShowMap := config.ReadBool('Editor', 'Minimap', False); @@ -4024,6 +4033,13 @@ var begin config := TConfig.CreateFile(EditorDir+'Editor.cfg'); + if WindowState <> wsMaximized then + begin + config.WriteInt('Editor', 'XPos', Left); + config.WriteInt('Editor', 'YPos', Top); + config.WriteInt('Editor', 'Width', Width); + config.WriteInt('Editor', 'Height', Height); + end; config.WriteBool('Editor', 'Maximize', WindowState = wsMaximized); config.WriteBool('Editor', 'Minimap', ShowMap); config.WriteInt('Editor', 'PanelProps', PanelProps.ClientWidth); @@ -6095,6 +6111,8 @@ begin PreviewMode := not PreviewMode; (Sender as TMenuItem).Checked := PreviewMode; + + FormResize(Self); end; procedure TMainForm.miLayer1Click(Sender: TObject);