[goocanvas/new-api] 2010-06-28 Damon Chaplin <damon gnome org>



commit 8646ee863a3ffe2f9ab4ac559c847625b63a99f9
Author: Damon Chaplin <damon gnome org>
Date:   Mon Jun 28 12:14:02 2010 +0100

    2010-06-28  Damon Chaplin  <damon gnome org>
    
    	    * src/goocanvasitemsimple.c (goo_canvas_item_simple_set_property):
    	    handle setting "clip-path" to NULL to reset it.

 ChangeLog                 |    5 +++++
 src/goocanvasitemsimple.c |    8 ++++++--
 2 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 5625c18..61211e2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-06-28  Damon Chaplin  <damon gnome org>
+
+	* src/goocanvasitemsimple.c (goo_canvas_item_simple_set_property): 
+	handle setting "clip-path" to NULL to reset it.
+
 2010-06-24  Damon Chaplin  <damon gnome org>
 
 	* Added "line-width-is-unscaled" property to GooCanvasItemSimple
diff --git a/src/goocanvasitemsimple.c b/src/goocanvasitemsimple.c
index ca51a9b..7522427 100644
--- a/src/goocanvasitemsimple.c
+++ b/src/goocanvasitemsimple.c
@@ -260,7 +260,7 @@ goo_canvas_item_simple_set_property (GObject              *object,
   cairo_pattern_t *pattern;
   gboolean need_update = TRUE, recompute_bounds = FALSE;
   cairo_matrix_t *transform;
-  const char *font_name;
+  const char *font_name, *path_data;
   PangoFontDescription *font_desc = NULL;
 
   /* See if we need to create a style. */
@@ -420,7 +420,11 @@ goo_canvas_item_simple_set_property (GObject              *object,
     case PROP_CLIP_PATH:
       if (simple->clip_path_commands)
 	g_array_free (simple->clip_path_commands, TRUE);
-      simple->clip_path_commands = goo_canvas_parse_path_data (g_value_get_string (value));
+      path_data = g_value_get_string (value);
+      if (path_data)
+	simple->clip_path_commands = goo_canvas_parse_path_data (path_data);
+      else
+	simple->clip_path_commands = NULL;
       recompute_bounds = TRUE;
       break;
     case PROP_CLIP_FILL_RULE:



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