lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master acbbaba 3/4: Fix another off by one error in


From: Greg Chicares
Subject: [lmi-commits] [lmi] master acbbaba 3/4: Fix another off by one error in tabular reports pagination
Date: Mon, 5 Feb 2018 19:13:57 -0500 (EST)

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

    Fix another off by one error in tabular reports pagination
    
    Avoid creating a new page in render() code if there is just enough space
    on the current page for the last group. This makes it consistent with
    get_extra_pages_needed().
---
 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 111eb0d..117ca74 100644
--- a/ledger_pdf_generator_wx.cpp
+++ b/ledger_pdf_generator_wx.cpp
@@ -1651,7 +1651,7 @@ class page_with_tabular_report
                     // And possibly a page break, which will be necessary if 
we don't
                     // have enough space for another full group because we 
don't want
                     // to have page breaks in the middle of a group.
-                    if(pos_y >= page_bottom - rows_per_group*row_height)
+                    if(pos_y > page_bottom - rows_per_group*row_height)
                         {
                         next_page(writer);
                         numbered_page::render(ledger, writer, 
interpolate_html);



reply via email to

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