From 27be3ce2429dc519462311d93cf060ca1cb359d0 Mon Sep 17 00:00:00 2001 From: William Skaggs Date: Wed, 14 Jun 2006 20:19:49 +0000 Subject: [PATCH] Bill Skaggs * app/tools/gimprectangleselecttool.c: Fix sporadic crash resulting from previous change. --- ChangeLog | 5 +++++ app/tools/gimprectangleselecttool.c | 13 ++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 59d2d6398f..0c133b7cd2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-06-14 Bill Skaggs + + * app/tools/gimprectangleselecttool.c: Fix sporadic crash + resulting from previous change. + 2006-06-14 Bill Skaggs * app/tools/gimprectangleselecttool.c: As suggested by Joao, diff --git a/app/tools/gimprectangleselecttool.c b/app/tools/gimprectangleselecttool.c index b5a3531229..c780788308 100644 --- a/app/tools/gimprectangleselecttool.c +++ b/app/tools/gimprectangleselecttool.c @@ -180,7 +180,6 @@ gimp_rect_select_tool_init (GimpRectSelectTool *rect_select) GimpRectangleTool *rect_tool = GIMP_RECTANGLE_TOOL (rect_select); gimp_tool_control_set_tool_cursor (tool->control, GIMP_TOOL_CURSOR_RECT_SELECT); -/* gimp_tool_control_set_preserve (tool->control, FALSE); */ gimp_tool_control_set_dirty_mask (tool->control, GIMP_DIRTY_IMAGE_SIZE | GIMP_DIRTY_SELECTION); @@ -592,8 +591,15 @@ gimp_rect_select_tool_execute (GimpRectangleTool *rectangle, } else { + GimpTool *tool = GIMP_TOOL (rectangle); + + /* prevent this change from halting the tool */ + gimp_tool_control_set_preserve (tool->control, TRUE); + /* otherwise clear the selection */ gimp_channel_clear (selection, NULL, TRUE); + + gimp_tool_control_set_preserve (tool->control, FALSE); } } @@ -619,8 +625,13 @@ gimp_rect_select_tool_cancel (GimpRectangleTool *rectangle) if (undo && rect_select->undo == undo) { + /* prevent this change from halting the tool */ + gimp_tool_control_set_preserve (tool->control, TRUE); + gimp_image_undo (image); gimp_image_flush (image); + + gimp_tool_control_set_preserve (tool->control, FALSE); } }