[gimp] app: when disconnecting from the text layer, also empty our text buffer
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: when disconnecting from the text layer, also empty our text buffer
- Date: Sat, 20 Feb 2010 18:44:18 +0000 (UTC)
commit 42de0453da5191d5ccc07111f7c755fd0592a691
Author: Michael Natterer <mitch gimp org>
Date: Sat Feb 20 19:43:17 2010 +0100
app: when disconnecting from the text layer, also empty our text buffer
or the remaining text will be added to the next text layer which is
created.
app/tools/gimptexttool.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/app/tools/gimptexttool.c b/app/tools/gimptexttool.c
index 3ffe11b..5f59432 100644
--- a/app/tools/gimptexttool.c
+++ b/app/tools/gimptexttool.c
@@ -1117,6 +1117,16 @@ gimp_text_tool_connect (GimpTextTool *text_tool,
text_tool->text = NULL;
g_object_set (text_tool->proxy, "text", NULL, NULL);
+
+ g_signal_handlers_block_by_func (text_tool->text_buffer,
+ gimp_text_tool_buffer_changed,
+ text_tool);
+
+ gtk_text_buffer_set_text (text_tool->text_buffer, "", -1);
+
+ g_signal_handlers_unblock_by_func (text_tool->text_buffer,
+ gimp_text_tool_buffer_changed,
+ text_tool);
}
gimp_context_define_property (GIMP_CONTEXT (options),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]