[goffice] Fixed pixels dust in text rotation selector. [#662393]



commit 4f133c1b7834ef582b401d0031260a8d6f9063d9
Author: Jean Brefort <jean brefort normalesup org>
Date:   Sat Nov 5 14:19:33 2011 +0100

    Fixed pixels dust in text rotation selector. [#662393]

 ChangeLog                     |    5 +++++
 NEWS                          |    1 +
 goffice/canvas/goc-item.c     |    8 +++++---
 goffice/canvas/goc-text.c     |    1 -
 goffice/gtk/go-rotation-sel.c |    1 -
 5 files changed, 11 insertions(+), 5 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 98e9bdd..2d0128f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2011-11-05  Jean Brefort  <jean brefort normalesup org>
 
+	* goffice/canvas/goc-item.c (goc_item_bounds_changed): invalidate new
+	position (and force a bound update). [#662393]
+
+2011-11-05  Jean Brefort  <jean brefort normalesup org>
+
 	* goffice/canvas/goc-polyline.c (goc_polyline_finalize),
 	(goc_polyline_class_init): fix memory leak. [#663355]
 
diff --git a/NEWS b/NEWS
index 103242f..0d63119 100644
--- a/NEWS
+++ b/NEWS
@@ -39,6 +39,7 @@ Jean:
 	* Add support for SVG images.
 	* Add some optional support for EPS images. [#663078]
 	* Fixed a memory leak in GocPolyline code. [#663355]
+	* Fixed pixels dust in text rotation selector. [#662393]
 
 Morten:
 	* Recognize scientific formats with longer exponents.
diff --git a/goffice/canvas/goc-item.c b/goffice/canvas/goc-item.c
index 5453106..b6c3688 100644
--- a/goffice/canvas/goc-item.c
+++ b/goffice/canvas/goc-item.c
@@ -572,12 +572,14 @@ goc_item_bounds_changed (GocItem *item)
 {
 	g_return_if_fail (GOC_IS_ITEM (item));
 	if (item->cached_bounds) {
+		GocItem *cur = item;
 		goc_item_invalidate (item);
 		do {
-			item->cached_bounds = FALSE;
-			item = GOC_ITEM (item->parent);
-		} while (item);
+			cur->cached_bounds = FALSE;
+			cur = GOC_ITEM (cur->parent);
+		} while (cur);
 	}
+	goc_item_invalidate (item);
 }
 
 /**
diff --git a/goffice/canvas/goc-text.c b/goffice/canvas/goc-text.c
index 2f1985e..bc997a1 100644
--- a/goffice/canvas/goc-text.c
+++ b/goffice/canvas/goc-text.c
@@ -148,7 +148,6 @@ goc_text_set_property (GObject *gobject, guint param_id,
 		return; /* NOTE : RETURN */
 	}
 	goc_item_bounds_changed (GOC_ITEM (gobject));
-
 }
 
 static void
diff --git a/goffice/gtk/go-rotation-sel.c b/goffice/gtk/go-rotation-sel.c
index a37bffb..5561e1a 100644
--- a/goffice/gtk/go-rotation-sel.c
+++ b/goffice/gtk/go-rotation-sel.c
@@ -90,7 +90,6 @@ cb_rotate_changed (GORotationSel *grs)
 		goc_item_set (grs->text, "x", x, "y", y,
 		              "rotation", rad, NULL);
 	}
-	gtk_widget_queue_draw (GTK_WIDGET (grs->rotate_canvas));
 }
 
 static void



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