fixed condition which triggers the path tool's undo hack. Fixes bug

2004-03-25  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpvectortool.c (gimp_vector_tool_button_release):
	fixed condition which triggers the path tool's undo hack.  Fixes
	bug #138086. Also g_object_unref() the undo step.

	Removed trailing whitespace.
This commit is contained in:
Michael Natterer 2004-03-25 12:46:20 +00:00 committed by Michael Natterer
parent 995c266b57
commit 13b46f4847
2 changed files with 17 additions and 8 deletions

View File

@ -1,3 +1,11 @@
2004-03-25 Michael Natterer <mitch@gimp.org>
* app/tools/gimpvectortool.c (gimp_vector_tool_button_release):
fixed condition which triggers the path tool's undo hack. Fixes
bug #138086. Also g_object_unref() the undo step.
Removed trailing whitespace.
2004-03-25 Manish Singh <yosh@gimp.org>
* libgimp/gimp.c

View File

@ -652,8 +652,8 @@ gimp_vector_tool_button_release (GimpTool *tool,
vector_tool->function = VECTORS_FINISHED;
if (!vector_tool->undo_motion ||
(state & GDK_BUTTON3_MASK && vector_tool->have_undo))
if (vector_tool->have_undo &&
(! vector_tool->undo_motion || (state & GDK_BUTTON3_MASK)))
{
GimpUndo *undo;
GimpUndoAccumulator accum = { 0, };
@ -664,6 +664,7 @@ gimp_vector_tool_button_release (GimpTool *tool,
gimp_image_undo_event (gdisp->gimage, GIMP_UNDO_EVENT_UNDO_EXPIRED, undo);
gimp_undo_free (undo, GIMP_UNDO_MODE_UNDO);
g_object_unref (undo);
}
vector_tool->have_undo = FALSE;