[glom] Print Layout: Increase page count correctly when expanding portals.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom] Print Layout: Increase page count correctly when expanding portals.
- Date: Fri, 14 Oct 2011 00:43:57 +0000 (UTC)
commit 7e1d146602456ef7338d2889448a30099fadd226
Author: Murray Cumming <murrayc murrayc com>
Date: Fri Oct 14 02:43:47 2011 +0200
Print Layout: Increase page count correctly when expanding portals.
* glom/print_layout/canvas_print_layout.cc: move_items_below_item():
Correct an off-by-one error in the calculation of the number of pages
needed.
ChangeLog | 8 ++++++++
glom/print_layout/canvas_print_layout.cc | 6 +++---
2 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 29c5110..79fa92b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2011-10-14 Murray Cumming <murrayc murrayc com>
+ Print Layout: Increase page count correctly when expanding portals.
+
+ * glom/print_layout/canvas_print_layout.cc: move_items_below_item():
+ Correct an off-by-one error in the calculation of the number of pages
+ needed.
+
+2011-10-14 Murray Cumming <murrayc murrayc com>
+
Print Layout: Create standard: Use the multiline text formatting.
* glom/print_layout/print_layout_utils.cc: create_standard():
diff --git a/glom/print_layout/canvas_print_layout.cc b/glom/print_layout/canvas_print_layout.cc
index ff2eada..c5e0876 100644
--- a/glom/print_layout/canvas_print_layout.cc
+++ b/glom/print_layout/canvas_print_layout.cc
@@ -1247,11 +1247,11 @@ void Canvas_PrintLayout::move_items_below_item(const Glib::RefPtr<CanvasLayoutIt
}
//Add extra pages if necessary:
- const guint page_count_needed = PrintLayoutUtils::get_page_for_y(page_Setup,
+ const guint last_page_needed = PrintLayoutUtils::get_page_for_y(page_Setup,
property_units(), bottom_max);
- if(page_count_needed > get_page_count())
+ if((last_page_needed + 1) > get_page_count())
{
- set_page_count(page_count_needed);
+ set_page_count(last_page_needed + 1);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]