diff --git a/components/tvplanit/source/vpedfmtlst.lfm b/components/tvplanit/source/vpedfmtlst.lfm index 0f2ccadc7..83b2b76b5 100644 --- a/components/tvplanit/source/vpedfmtlst.lfm +++ b/components/tvplanit/source/vpedfmtlst.lfm @@ -10,6 +10,7 @@ object frmPrnFormat: TfrmPrnFormat OnCreate = FormCreate OnShow = FormShow Position = poScreenCenter + LCLVersion = '2.3.0.0' object LblFormats: TLabel AnchorSideLeft.Control = Owner AnchorSideTop.Control = Owner diff --git a/components/tvplanit/source/vpedfmtlst.pas b/components/tvplanit/source/vpedfmtlst.pas index 3b8e6e650..3b7284e1a 100644 --- a/components/tvplanit/source/vpedfmtlst.pas +++ b/components/tvplanit/source/vpedfmtlst.pas @@ -618,6 +618,8 @@ var E: TVpPrintFormatElementItem; Prn: TVpPrinter; i, Idx: Integer; + + t: TDateTime; begin if LbFormats.ItemIndex = -1 then exit; @@ -628,15 +630,17 @@ begin Prn.CurFormat := Idx; - PrintPreview.ControlLink := ControlLink; - RebuildPreview; + if PrintPreview.ControlLink <> ControlLink then + PrintPreview.ControlLink := ControlLink + else + RebuildPreview; for i := 0 to Pred(Prn.PrintFormats.Items[Idx].Elements.Count) do begin E := Prn.PrintFormats.Items[Idx].Elements.Items[i]; lbElements.Items.AddObject(E.ElementName, E); end; - UpdatePreview; + //UpdatePreview; EnableElementButtons(False); btnNewElement.Enabled := True;