[gimp] app: pass the image to g_object_new() in gimp_text_layer_from_layer()



commit 40e11d7ad1ea68da980b460247ef10d872fd9d41
Author: Michael Natterer <mitch gimp org>
Date:   Tue Feb 1 14:15:46 2011 +0100

    app: pass the image to g_object_new() in gimp_text_layer_from_layer()

 app/text/gimptextlayer-xcf.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/app/text/gimptextlayer-xcf.c b/app/text/gimptextlayer-xcf.c
index 715ef28..60ab846 100644
--- a/app/text/gimptextlayer-xcf.c
+++ b/app/text/gimptextlayer-xcf.c
@@ -183,7 +183,9 @@ gimp_text_layer_from_layer (GimpLayer *layer,
   g_return_val_if_fail (GIMP_IS_LAYER (layer), NULL);
   g_return_val_if_fail (GIMP_IS_TEXT (text), NULL);
 
-  text_layer = g_object_new (GIMP_TYPE_TEXT_LAYER, NULL);
+  text_layer = g_object_new (GIMP_TYPE_TEXT_LAYER,
+                             "image", gimp_item_get_image (GIMP_ITEM (layer)),
+                             NULL);
 
   gimp_item_replace_item (GIMP_ITEM (text_layer), GIMP_ITEM (layer));
 



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