浏览代码

Make it show after updates till dismissed.

Martijn Laan 1 年之前
父节点
当前提交
21134d1433
共有 1 个文件被更改,包括 12 次插入0 次删除
  1. 12 0
      Projects/Src/IDE.MainForm.pas

+ 12 - 0
Projects/Src/IDE.MainForm.pas

@@ -834,6 +834,11 @@ constructor TMainForm.Create(AOwner: TComponent);
         if Memo <> FMainMemo then
           Memo.Font := FMainMemo.Font;
 
+      { UpdatePanel visibility }
+      var KnownVersion := Cardinal(Ini.ReadInteger('Options', 'KnownVersion', 0));
+      UpdatePanel.Visible := KnownVersion < FCompilerVersion.BinVersion;
+      UpdateBevel1Visibility;
+
       { Debug options }
       FOptions.ShowCaretPosition := Ini.ReadBool('Options', 'ShowCaretPosition', False);
       if FOptions.ShowCaretPosition then
@@ -864,6 +869,7 @@ constructor TMainForm.Create(AOwner: TComponent);
       { Note: Don't call UpdateStatusPanelHeight here since it clips to the
         current form height, which hasn't been finalized yet }
 
+      { StatusPanel height }
       StatusPanel.Height := ToCurrentPPI(Ini.ReadInteger('State', 'StatusPanelHeight',
         (10 * FromCurrentPPI(DebugOutputList.ItemHeight) + 4) + FromCurrentPPI(OutputTabSet.Height)));
     finally
@@ -7482,6 +7488,12 @@ end;
 
 procedure TMainForm.UpdatePanelClosePaintBoxClick(Sender: TObject);
 begin
+  var Ini := TConfigIniFile.Create;
+  try
+    Ini.WriteInteger('Options', 'KnownVersion', FCompilerVersion.BinVersion);
+  finally
+    Ini.Free;
+  end;
   UpdatePanel.Visible := False;
   UpdateBevel1Visibility;
 end;