[goocanvas/goocanvas-1.0] 2011-08-17 Damon Chaplin <damon gnome org>



commit e34fad62b48072236b4155245f00fe560181c6ee
Author: Damon Chaplin <damon gnome org>
Date:   Wed Aug 17 16:52:37 2011 +0100

    2011-08-17  Damon Chaplin  <damon gnome org>
    
    	    * src/goocanvastext.c (goo_canvas_text_get_requested_height): when
    	    the height property is set make sure the bounds are still calculated.
    	    Fixes redraw problems. (The way layout is done is too confusing.)
    	    #656391

 ChangeLog           |   11 +++++++++++
 src/goocanvastext.c |   13 +++++++------
 2 files changed, 18 insertions(+), 6 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 3ee2515..01a05df 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2011-08-17  Damon Chaplin  <damon gnome org>
+
+	* src/goocanvastext.c (goo_canvas_text_get_requested_height): when
+	the height property is set make sure the bounds are still calculated.
+	Fixes redraw problems. (The way layout is done is too confusing.)
+	#656391
+
+2011-01-10  Damon Chaplin  <damon gnome org>
+
+	* Released GooCanvas 1.0.0
+
 2011-01-10  Damon Chaplin  <damon gnome org>
 
 	* src/goocanvasimage.c: added "alpha" property. Patch from xapantu
diff --git a/src/goocanvastext.c b/src/goocanvastext.c
index 10508fe..d65f09e 100644
--- a/src/goocanvastext.c
+++ b/src/goocanvastext.c
@@ -773,19 +773,20 @@ goo_canvas_text_get_requested_height (GooCanvasItem	*item,
   if (simple_data->transform)
     text->layout_width /= simple_data->transform->xx;
 
+  /* Create layout with given width. */
+  layout = goo_canvas_text_create_layout (simple_data, text->text_data,
+					  text->layout_width, cr,
+					  &simple->bounds, NULL, NULL);
+  g_object_unref (layout);
+
   if (priv->height < 0.0)
     {
-     /* Create layout with given width. */
-      layout = goo_canvas_text_create_layout (simple_data, text->text_data,
-					      text->layout_width, cr,
-					      &simple->bounds, NULL, NULL);
-      g_object_unref (layout);
-
       height = simple->bounds.y2 - simple->bounds.y1;
     }
   else
     {
       height = priv->height;
+      simple->bounds.y2 = simple->bounds.y1 + height;
     }
 
   /* Convert to the parent's coordinate space. As above, we only need to



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