DEADSOFTWARE

Cleanup: Eliminate warnings and hints
[d2df-editor.git] / src / editor / f_main.pas
index a87747362f596fca53cb69bac2bb2c58b5b59b29..2216151be62ac733692ba26562c2dfebd06c9a35 100644 (file)
@@ -4033,10 +4033,13 @@ var
 begin
   config := TConfig.CreateFile(EditorDir+'Editor.cfg');
 
-  config.WriteInt('Editor', 'XPos', Left);
-  config.WriteInt('Editor', 'YPos', Top);
-  config.WriteInt('Editor', 'Width', Width);
-  config.WriteInt('Editor', 'Height', Height);
+  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);
@@ -6245,7 +6248,6 @@ var
   cmd, mapWAD, mapToRun: String;
   opt: LongWord;
   time: Integer;
-  lpMsgBuf: PChar;
 begin
   // Сохраняем временную карту:
   time := 0;