Bug 766706: Deleting text layer content does not clean canvas

This commit is contained in:
Massimo Valentini 2016-06-27 16:48:14 +02:00
parent 5ca2794d40
commit 4eef125153
2 changed files with 10 additions and 3 deletions

View File

@ -694,8 +694,11 @@ gimp_text_layer_render (GimpTextLayer *layer)
g_free (tmp);
}
if (! name)
name = g_strdup (_("Empty Text Layer"));
if (! name || ! name[0])
{
g_free (name);
name = g_strdup (_("Empty Text Layer"));
}
if (gimp_item_is_attached (item))
{

View File

@ -611,7 +611,11 @@ gimp_text_layout_position (GimpTextLayout *layout)
#endif
if (ink.width < 1 || ink.height < 1)
return;
{
layout->extents.width = 1;
layout->extents.height = logical.height;
return;
}
x1 = MIN (ink.x, logical.x);
y1 = MIN (ink.y, logical.y);