Commit 7fdd4af6 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

it wasn't such a good idea to let GimpConfig take care of the text when

2004-03-20  Sven Neumann  <sven@gimp.org>

	* app/text/gimptextlayer.c: it wasn't such a good idea to let
	GimpConfig take care of the text when duplicating a text layer; it
	didn't create a copy. Do that manually again; fixes bug #137786.
parent 584b3ceb
2004-03-20 Sven Neumann <sven@gimp.org>
* app/text/gimptextlayer.c: it wasn't such a good idea to let
GimpConfig take care of the text when duplicating a text layer; it
didn't create a copy. Do that manually again; fixes bug #137786.
2004-03-20 Sven Neumann <sven@gimp.org>
* app/tools/gimptexttool.c (gimp_text_tool_create_vectors): don't
......@@ -58,7 +58,6 @@
enum
{
PROP_0,
PROP_TEXT,
PROP_AUTO_RENAME,
PROP_MODIFIED
};
......@@ -189,10 +188,6 @@ gimp_text_layer_class_init (GimpTextLayerClass *klass)
drawable_class->set_tiles = gimp_text_layer_set_tiles;
drawable_class->swap_pixels = gimp_text_layer_swap_pixels;
GIMP_CONFIG_INSTALL_PROP_OBJECT (object_class, PROP_TEXT,
"text", NULL,
GIMP_TYPE_TEXT,
0);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_AUTO_RENAME,
"auto-rename", NULL,
TRUE,
......@@ -234,9 +229,6 @@ gimp_text_layer_get_property (GObject *object,
switch (property_id)
{
case PROP_TEXT:
g_value_set_object (value, text_layer->text);
break;
case PROP_AUTO_RENAME:
g_value_set_boolean (value, text_layer->auto_rename);
break;
......@@ -259,9 +251,6 @@ gimp_text_layer_set_property (GObject *object,
switch (property_id)
{
case PROP_TEXT:
gimp_text_layer_set_text (text_layer, g_value_get_object (value));
break;
case PROP_AUTO_RENAME:
text_layer->auto_rename = g_value_get_boolean (value);
break;
......@@ -296,18 +285,31 @@ gimp_text_layer_duplicate (GimpItem *item,
GType new_type,
gboolean add_alpha)
{
GimpItem *new_item;
GimpTextLayer *layer;
GimpItem *new_item;
g_return_val_if_fail (g_type_is_a (new_type, GIMP_TYPE_DRAWABLE), NULL);
new_item = GIMP_ITEM_CLASS (parent_class)->duplicate (item, new_type,
new_item = GIMP_ITEM_CLASS (parent_class)->duplicate (item,
new_type,
add_alpha);
if (! GIMP_IS_TEXT_LAYER (new_item))
return new_item;
layer = GIMP_TEXT_LAYER (item);
gimp_config_sync (GIMP_CONFIG (item), GIMP_CONFIG (new_item), 0);
if (layer->text)
{
GimpText *text = gimp_config_duplicate (GIMP_CONFIG (layer->text));
gimp_text_layer_set_text (GIMP_TEXT_LAYER (new_item), text);
g_object_unref (text);
}
return new_item;
}
......@@ -461,8 +463,6 @@ gimp_text_layer_set_text (GimpTextLayer *layer,
layer, G_CONNECT_SWAPPED);
}
g_object_notify (G_OBJECT (layer), "text");
gimp_viewable_invalidate_preview (GIMP_VIEWABLE (layer));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment