[gimp] Bug 766706: Deleting text layer content does not clean canvas
- From: Massimo Valentini <mvalentini src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Bug 766706: Deleting text layer content does not clean canvas
- Date: Mon, 27 Jun 2016 15:04:14 +0000 (UTC)
commit 4eef12515377c427e57b0ac11716bd69e1153937
Author: Massimo Valentini <mvalentini src gnome org>
Date: Mon Jun 27 16:48:14 2016 +0200
Bug 766706: Deleting text layer content does not clean canvas
app/text/gimptextlayer.c | 7 +++++--
app/text/gimptextlayout.c | 6 +++++-
2 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/app/text/gimptextlayer.c b/app/text/gimptextlayer.c
index 0bdfe0f..0824c13 100644
--- a/app/text/gimptextlayer.c
+++ b/app/text/gimptextlayer.c
@@ -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))
{
diff --git a/app/text/gimptextlayout.c b/app/text/gimptextlayout.c
index 02c43ad..e53ad63 100644
--- a/app/text/gimptextlayout.c
+++ b/app/text/gimptextlayout.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]