flush the image after changing it.

2006-06-06  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpnewrectselecttool.c
	(gimp_new_rect_select_tool_cancel)
	(gimp_new_rect_select_tool_rectangle_changed): flush the image
	after changing it.

	* app/tools/gimprectangletool.c (gimp_rectangle_tool_halt): don't
	flush it here.
This commit is contained in:
Michael Natterer 2006-06-06 08:04:49 +00:00 committed by Michael Natterer
parent f50b532494
commit b18a520b3f
4 changed files with 28 additions and 12 deletions

View file

@ -1,3 +1,13 @@
2006-06-06 Michael Natterer <mitch@gimp.org>
* app/tools/gimpnewrectselecttool.c
(gimp_new_rect_select_tool_cancel)
(gimp_new_rect_select_tool_rectangle_changed): flush the image
after changing it.
* app/tools/gimprectangletool.c (gimp_rectangle_tool_halt): don't
flush it here.
2006-06-06 Sven Neumann <sven@gimp.org>
* app/actions/select-commands.c: minor cleanup.

View file

@ -495,13 +495,13 @@ gimp_new_rect_select_tool_execute (GimpRectangleTool *rectangle,
static void
gimp_new_rect_select_tool_cancel (GimpRectangleTool *rectangle)
{
GimpTool *tool = GIMP_TOOL (rectangle);
GimpTool *tool = GIMP_TOOL (rectangle);
GimpNewRectSelectTool *rect_select = GIMP_NEW_RECT_SELECT_TOOL (rectangle);
if (tool->display)
{
GimpNewRectSelectTool *rect_select = GIMP_NEW_RECT_SELECT_TOOL (tool);
GimpImage *image = tool->display->image;
GimpUndo *undo;
GimpImage *image = tool->display->image;
GimpUndo *undo;
/* if we have an existing rectangle in the current display, then
* we have already "executed", and need to undo at this point,
@ -512,9 +512,11 @@ gimp_new_rect_select_tool_cancel (GimpRectangleTool *rectangle)
if (undo && rect_select->undo == undo)
{
gimp_image_undo (image);
rect_select->undo = NULL;
gimp_image_flush (image);
}
}
rect_select->undo = NULL;
}
static gboolean
@ -555,6 +557,8 @@ gimp_new_rect_select_tool_rectangle_changed (GimpRectangleTool *rectangle)
/* save the undo that we got when executing */
rect_select->undo = gimp_undo_stack_peek (image->undo_stack);
gimp_image_flush (image);
}
return TRUE;

View file

@ -495,13 +495,13 @@ gimp_new_rect_select_tool_execute (GimpRectangleTool *rectangle,
static void
gimp_new_rect_select_tool_cancel (GimpRectangleTool *rectangle)
{
GimpTool *tool = GIMP_TOOL (rectangle);
GimpTool *tool = GIMP_TOOL (rectangle);
GimpNewRectSelectTool *rect_select = GIMP_NEW_RECT_SELECT_TOOL (rectangle);
if (tool->display)
{
GimpNewRectSelectTool *rect_select = GIMP_NEW_RECT_SELECT_TOOL (tool);
GimpImage *image = tool->display->image;
GimpUndo *undo;
GimpImage *image = tool->display->image;
GimpUndo *undo;
/* if we have an existing rectangle in the current display, then
* we have already "executed", and need to undo at this point,
@ -512,9 +512,11 @@ gimp_new_rect_select_tool_cancel (GimpRectangleTool *rectangle)
if (undo && rect_select->undo == undo)
{
gimp_image_undo (image);
rect_select->undo = NULL;
gimp_image_flush (image);
}
}
rect_select->undo = NULL;
}
static gboolean
@ -555,6 +557,8 @@ gimp_new_rect_select_tool_rectangle_changed (GimpRectangleTool *rectangle)
/* save the undo that we got when executing */
rect_select->undo = gimp_undo_stack_peek (image->undo_stack);
gimp_image_flush (image);
}
return TRUE;

View file

@ -1845,8 +1845,6 @@ gimp_rectangle_tool_halt (GimpRectangleTool *rectangle)
if (gimp_tool_control_is_active (tool->control))
gimp_tool_control_halt (tool->control);
gimp_image_flush (tool->display->image);
tool->display = NULL;
tool->drawable = NULL;