lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master 9f7fe68 2/4: Fix skipping a year in tabular r


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 9f7fe68 2/4: Fix skipping a year in tabular reports in the generated PDF
Date: Mon, 5 Feb 2018 19:13:57 -0500 (EST)

branch: master
commit 9f7fe685446b8bc7df382b08f96e35f446a8bc62
Author: Vadim Zeitlin <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Fix skipping a year in tabular reports in the generated PDF
    
    This fixes a bug introduced by 74872e0aca6f11312f8b65bc49799f8c3a218e28
    which forgot to remove the year increment in the outer loop which is not
    needed any longer since the year is always incremented, even on reaching
    the end of the page, in the inner one.
    
    It also corrects warnings about missing extra pages due to the fact that
    this bug resulted in actually generated table being shorter than planned
    (which is what 74872e0aca6f11312f8b65bc49799f8c3a218e28 was supposed to
    fix in the first place).
---
 ledger_pdf_generator_wx.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ledger_pdf_generator_wx.cpp b/ledger_pdf_generator_wx.cpp
index 1e23f6a..111eb0d 100644
--- a/ledger_pdf_generator_wx.cpp
+++ b/ledger_pdf_generator_wx.cpp
@@ -1610,7 +1610,7 @@ class page_with_tabular_report
 
         // The table may need several pages, loop over them.
         int const year_max = ledger.GetMaxLength();
-        for(int year = 0; year < year_max; ++year)
+        for(int year = 0; year < year_max; )
             {
             int pos_y = render_or_measure_fixed_page_part
                 (table



reply via email to

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