lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 457d1b0 1/5: Allow creating scaled old and ne


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 457d1b0 1/5: Allow creating scaled old and new PDFs at the same time
Date: Thu, 8 Mar 2018 18:02:13 -0500 (EST)

branch: master
commit 457d1b0667a87a597828a7458fea1311d6a5afad
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Allow creating scaled old and new PDFs at the same time
    
    Previously, ",000" scaling caused an assertion failure when the second
    PDF of the pair was created.
---
 ledger_pdf.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/ledger_pdf.cpp b/ledger_pdf.cpp
index 8d5ff98..8feaca2 100644
--- a/ledger_pdf.cpp
+++ b/ledger_pdf.cpp
@@ -27,6 +27,7 @@
 #include "contains.hpp" // PDF !! expunge
 #include "global_settings.hpp" // PDF !! expunge
 #include "ledger.hpp"
+#include "ledger_invariant.hpp" // PDF !! expunge
 #include "ledger_pdf_generator.hpp"
 #include "ledger_xsl.hpp" // PDF !! expunge
 #include "path_utility.hpp"             // unique_filepath()
@@ -87,6 +88,8 @@ std::string write_ledger_as_pdf(Ledger const& ledger, 
fs::path const& filepath)
     fs::path pdf_out_file = unique_filepath(print_dir / filepath, ".pdf");
 
     Ledger scaled_ledger(ledger);
+    // PDF !! Expunge this 'if' line (but not the statement it controls):
+    if(1.0 == scaled_ledger.GetLedgerInvariant().ScaleFactor())
     scaled_ledger.AutoScale();
     auto const pdf = ledger_pdf_generator::create();
     pdf->write(scaled_ledger, pdf_out_file);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]