[gimp] app: fix editing text layers which don't contain markup
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: fix editing text layers which don't contain markup
- Date: Wed, 3 Mar 2010 00:17:38 +0000 (UTC)
commit 080f1a6ce4c0e6f7ec136f925e0dd117dd9b94d6
Author: Michael Natterer <mitch gimp org>
Date: Wed Mar 3 01:15:27 2010 +0100
app: fix editing text layers which don't contain markup
In gimp_text_tool_connect(), set either text *or* markup on the
buffer, or the latter will always override the former (now that text
and markup are mutually exclusive in GimpText).
app/tools/gimptexttool.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/app/tools/gimptexttool.c b/app/tools/gimptexttool.c
index 6aa1231..7d2d87f 100644
--- a/app/tools/gimptexttool.c
+++ b/app/tools/gimptexttool.c
@@ -947,7 +947,7 @@ gimp_text_tool_connect (GimpTextTool *text_tool,
"text", NULL,
"markup", NULL,
NULL);
- gimp_text_buffer_set_markup (text_tool->buffer, NULL);
+ gimp_text_buffer_set_text (text_tool->buffer, NULL);
gimp_text_tool_clear_layout (text_tool);
}
@@ -959,8 +959,11 @@ gimp_text_tool_connect (GimpTextTool *text_tool,
if (text)
{
gimp_config_sync (G_OBJECT (text), G_OBJECT (text_tool->proxy), 0);
- gimp_text_buffer_set_text (text_tool->buffer, text->text);
- gimp_text_buffer_set_markup (text_tool->buffer, text->markup);
+
+ if (text->markup)
+ gimp_text_buffer_set_markup (text_tool->buffer, text->markup);
+ else
+ gimp_text_buffer_set_text (text_tool->buffer, text->text);
gimp_text_tool_clear_layout (text_tool);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]