[glom] Minor fix



commit c8b69f4471cc0549f21f36528a06f50ad68f0e87
Author: Murray Cumming <murrayc murrayc com>
Date:   Thu Oct 13 23:38:46 2011 +0200

    Minor fix

 glom/print_layout/print_layout_utils.cc |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/glom/print_layout/print_layout_utils.cc b/glom/print_layout/print_layout_utils.cc
index 94820a9..8d5a6f2 100644
--- a/glom/print_layout/print_layout_utils.cc
+++ b/glom/print_layout/print_layout_utils.cc
@@ -319,9 +319,10 @@ sharedptr<PrintLayout> create_standard(const Glib::RefPtr<const Gtk::PageSetup>&
   }
 
   //Add extra pages if necessary:
-  //TODO: y is probably _after_ the last item, not exactly at the bottom of the last item,
+  //y is probably _after_ the last item, not exactly at the bottom of the last item, so we subtract gap.
+  //TODO: However, this might not be reliable,
   //so this could lead to an extra blank page.
-  const guint page_number = get_page_for_y(page_setup, units, y);
+  const guint page_number = get_page_for_y(page_setup, units, y - gap);
   if(page_number >= print_layout->get_page_count())
   {
     print_layout->set_page_count(page_number + 1);



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