Commit 5420154a authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

if there's a layer mask, resize it with the layer.

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

	* app/text/gimptextlayer.c (gimp_text_layer_render): if there's a
	layer mask, resize it with the layer.

	* app/tools/gimptexttool.c: don't change text_tool->layer before
	calling gimp_text_tool_connect().
parent 72ea1aff
2004-03-19 Sven Neumann <sven@gimp.org>
* app/text/gimptextlayer.c (gimp_text_layer_render): if there's a
layer mask, resize it with the layer.
* app/tools/gimptexttool.c: don't change text_tool->layer before
calling gimp_text_tool_connect().
2004-03-19 Sven Neumann <sven@gimp.org>
* etc/ps-menurc: updated PS keybindings contributed by Eric Pierce.
......@@ -550,11 +550,18 @@ gimp_text_layer_render (GimpTextLayer *layer)
(width != gimp_item_width (item) ||
height != gimp_item_height (item)))
{
TileManager *new_tiles = tile_manager_new (width, height,
drawable->bytes);
TileManager *new_tiles;
item->width = width;
item->height = height;
new_tiles = tile_manager_new (width, height, drawable->bytes);
gimp_drawable_set_tiles (drawable, FALSE, NULL, new_tiles);
tile_manager_unref (new_tiles);
if (GIMP_LAYER (layer)->mask)
gimp_item_resize (GIMP_ITEM (GIMP_LAYER (layer)->mask),
width, height, 0, 0);
}
if (layer->auto_rename)
......
......@@ -313,6 +313,7 @@ gimp_text_tool_button_press (GimpTool *tool,
}
/* create a new text layer */
gimp_text_tool_connect (text_tool, NULL);
gimp_text_tool_editor (text_tool);
}
......@@ -462,6 +463,7 @@ gimp_text_tool_apply (GimpTextTool *text_tool)
}
g_return_if_fail (text_tool->text != NULL);
g_return_if_fail (text_tool->layer != NULL);
src = G_OBJECT (text_tool->proxy);
dest = G_OBJECT (text_tool->text);
......@@ -659,8 +661,8 @@ gimp_text_tool_confirm_response (GtkWidget *widget,
break;
case GTK_RESPONSE_OK:
text_tool->layer = layer;
gimp_text_tool_connect (text_tool, text_layer->text);
text_tool->layer = layer;
break;
default:
......@@ -792,20 +794,22 @@ gimp_text_tool_set_drawable (GimpTextTool *text_tool,
if (drawable && GIMP_IS_LAYER (drawable))
{
text_tool->layer = GIMP_LAYER (drawable);
if (GIMP_IS_TEXT_LAYER (drawable) && GIMP_TEXT_LAYER (drawable)->text)
{
GimpTextLayer *text_layer = GIMP_TEXT_LAYER (drawable);
if (text_layer->text == text_tool->text)
return TRUE;
{
text_tool->layer = GIMP_LAYER (drawable);
return TRUE;
}
if (text_layer->modified)
{
if (confirm)
{
gimp_text_tool_connect (text_tool, NULL);
text_tool->layer = GIMP_LAYER (drawable);
gimp_text_tool_confirm_dialog (text_tool);
return TRUE;
}
......@@ -813,16 +817,15 @@ gimp_text_tool_set_drawable (GimpTextTool *text_tool,
else
{
gimp_text_tool_connect (text_tool, text_layer->text);
text_tool->layer = GIMP_LAYER (drawable);
return TRUE;
}
}
}
else
{
text_tool->layer = NULL;
}
gimp_text_tool_connect (text_tool, NULL);
text_tool->layer = NULL;
return FALSE;
}
......
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