[goffice] always invalidate the previous region when a canvas item bounds change



commit df35cd19b8259b3d72a7fd1c67fe570fd431939a
Author: Jean Brefort <jean brefort normalesup org>
Date:   Fri Nov 13 14:14:34 2009 +0100

    always invalidate the previous region when a canvas item bounds change

 ChangeLog                 |    5 +++++
 goffice/canvas/goc-item.c |    5 ++++-
 2 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 9a07a8e..1274eb3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-11-13  Jean Brefort  <jean brefort normalesup org>
+
+	* goffice/canvas/goc-item.c (goc_item_bounds_changed): make sure that the
+	previously occupied region is invalidated.
+
 2009-11-12  Jean Brefort  <jean brefort normalesup org>
 
 	* plugins/plot_pie/gog-pie.c (gog_pie_view_get_data_at_point): do not
diff --git a/goffice/canvas/goc-item.c b/goffice/canvas/goc-item.c
index 5588b0f..1bb903e 100644
--- a/goffice/canvas/goc-item.c
+++ b/goffice/canvas/goc-item.c
@@ -518,7 +518,10 @@ void
 goc_item_bounds_changed (GocItem *item)
 {
 	g_return_if_fail (GOC_IS_ITEM (item));
-	item->cached_bounds = FALSE;
+	if (item->cached_bounds) {
+		goc_item_invalidate (item);
+		item->cached_bounds = FALSE;
+	}
 	if (item->parent)
 		goc_item_bounds_changed (GOC_ITEM (item->parent));
 }



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