[gimp] app: fix crash caused by bogus value of text_tool->selecting
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: fix crash caused by bogus value of text_tool->selecting
- Date: Tue, 23 Feb 2010 22:48:15 +0000 (UTC)
commit a17ede4ce00819450aff7a79d0a0f36a139932d3
Author: Michael Natterer <mitch gimp org>
Date: Tue Feb 23 23:46:09 2010 +0100
app: fix crash caused by bogus value of text_tool->selecting
Set "selecting" to TRUE only when we are definitely in selecting mode
(when there is actually a text layer to click on). This commit also
makes the setting of the "selecting" state much simpler and obvious.
app/tools/gimptexttool.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/app/tools/gimptexttool.c b/app/tools/gimptexttool.c
index e6e9c24..506bd52 100644
--- a/app/tools/gimptexttool.c
+++ b/app/tools/gimptexttool.c
@@ -378,8 +378,6 @@ gimp_text_tool_button_press (GimpTool *tool,
coords->y) &&
! text_tool->moving)
{
- text_tool->selecting = TRUE;
-
gimp_rectangle_tool_set_function (rect_tool, GIMP_RECTANGLE_TOOL_DEAD);
gimp_tool_control_activate (tool->control);
}
@@ -428,8 +426,6 @@ gimp_text_tool_button_press (GimpTool *tool,
if (gimp_rectangle_tool_get_function (rect_tool) ==
GIMP_RECTANGLE_TOOL_CREATING)
{
- text_tool->selecting = TRUE;
-
gimp_rectangle_tool_set_function (rect_tool,
GIMP_RECTANGLE_TOOL_DEAD);
@@ -444,6 +440,8 @@ gimp_text_tool_button_press (GimpTool *tool,
if (text_tool->text)
{
+ text_tool->selecting = TRUE;
+
gimp_text_tool_editor_button_press (text_tool, x, y, press_type);
}
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]