Explorar o código

历史版本多选项卡优化。

Chenshilong %!s(int64=8) %!d(string=hai) anos
pai
achega
82a83b08ef
Modificáronse 1 ficheiros con 15 adicións e 3 borrados
  1. 15 3
      Forms/ReportHistoryFrm.pas

+ 15 - 3
Forms/ReportHistoryFrm.pas

@@ -64,11 +64,23 @@ begin
   lblReportName.Caption := FReport.FileName;
   lblReportName.Update;
 
+  tcHistory.Tabs.Delete(0);
+  tcHistory.Tabs.Delete(0);
+  tcHistory.Tabs.Delete(0);
 
+  if FReport.NewestVer <> '' then
+    tcHistory.Tabs.Add(FReport.NewestVer);
+
+  if FReport.HistoryVer1 <> '' then
+    tcHistory.Tabs.Add(FReport.HistoryVer1);
+
+  if FReport.HistoryVer2 <> '' then
+    tcHistory.Tabs.Add(FReport.HistoryVer2);
+
+//  tcHistory.Tabs[0] := FReport.NewestVer;
+//  tcHistory.Tabs[1] := FReport.HistoryVer1;
+//  tcHistory.Tabs[2] := FReport.HistoryVer2;
 
-  tcHistory.Tabs[0] := FReport.NewestVer;
-  tcHistory.Tabs[1] := FReport.HistoryVer1;
-  tcHistory.Tabs[2] := FReport.HistoryVer2;
   tcHistory.OnChange(nil);
 end;