[glom] Print Layout: Small improvement.



commit 96b7dff977cb1a83447f49dc21cd90beabc9247b
Author: Murray Cumming <murrayc murrayc com>
Date:   Fri Oct 14 01:36:22 2011 +0200

    Print Layout: Small improvement.
    
    	* glom/print_layout/canvas_print_layout.cc: move_items_below_item():
    	Check that we don't move the item itself.

 ChangeLog                                |    7 +++++++
 glom/print_layout/canvas_print_layout.cc |    3 +++
 2 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index baceb94..f0802e3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-10-14  Murray Cumming  <murrayc murrayc com>
+
+	Print Layout: Small improvement.
+
+	* glom/print_layout/canvas_print_layout.cc: move_items_below_item():
+	Check that we don't move the item itself.
+
 2011-10-13  Murray Cumming  <murrayc murrayc com>
 
 	Print Layout: Code improvement.
diff --git a/glom/print_layout/canvas_print_layout.cc b/glom/print_layout/canvas_print_layout.cc
index 08dd317..ff2eada 100644
--- a/glom/print_layout/canvas_print_layout.cc
+++ b/glom/print_layout/canvas_print_layout.cc
@@ -1214,6 +1214,9 @@ void Canvas_PrintLayout::move_items_below_item(const Glib::RefPtr<CanvasLayoutIt
     if(!derived)
       continue;
 
+    if(derived == canvas_item)
+      continue;
+
     //Ignore items above y_start:
     double x = 0;
     double y = 0;



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