Code

Split SPCanvasItem and SPCanvasGroup to individual .h files. Removed forward header.
[inkscape.git] / src / display / canvas-text.cpp
index 351aca6396afbc2d921e2a44455d3cd90a34183f..e2bc096793967eb9247481e379efbb330083130e 100644 (file)
@@ -13,7 +13,6 @@
  * Released under GNU GPL, read the file 'COPYING' for more information
  */
 
-#include "display-forward.h"
 #include "sp-canvas-util.h"
 #include "canvas-text.h"
 #include "display/inkscape-cairo.h"
@@ -91,7 +90,9 @@ sp_canvastext_destroy (GtkObject *object)
 
     SPCanvasText *canvastext = SP_CANVASTEXT (object);
 
-    canvastext->item=NULL;
+    g_free(canvastext->text);
+    canvastext->text = NULL;
+    canvastext->item = NULL;
 
     if (GTK_OBJECT_CLASS (parent_class_ct)->destroy)
         (* GTK_OBJECT_CLASS (parent_class_ct)->destroy) (object);
@@ -200,7 +201,7 @@ sp_canvastext_set_rgba32 (SPCanvasText *ct, guint32 rgba, guint32 rgba_stroke)
         ct->rgba = rgba;
         ct->rgba_stroke = rgba_stroke;
         SPCanvasItem *item = SP_CANVAS_ITEM (ct);
-        sp_canvas_item_request_update (SP_CANVAS_ITEM (ct));
+        sp_canvas_item_request_update( item );
     }
 }
 
@@ -267,4 +268,4 @@ sp_canvastext_set_anchor (SPCanvasText *ct, double anchor_x, double anchor_y)
   fill-column:99
   End:
 */
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :