fixed drawing code to properly update after deleting nodes via

2004-06-28  Simon Budig  <simon@gimp.org>

	* app/tools/gimpvectortool.c: fixed drawing code to properly
	update after deleting nodes via BackSpace/Delete.
This commit is contained in:
Simon Budig 2004-06-27 23:00:46 +00:00 committed by Simon Budig
parent d6428d61ab
commit 96e8b93e2a
2 changed files with 26 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2004-06-28 Simon Budig <simon@gimp.org>
* app/tools/gimpvectortool.c: fixed drawing code to properly
update after deleting nodes via BackSpace/Delete.
2004-06-27 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/tools/gimplevelstool.c: removed two small chunks of code.

View File

@ -1721,8 +1721,12 @@ gimp_vector_tool_delete_selected_anchors (GimpVectorTool *vector_tool)
{
GimpAnchor *cur_anchor;
GimpStroke *cur_stroke = NULL;
GList *anchors;
GList *list;
GList *anchors;
GList *list;
gboolean have_undo = FALSE;
gimp_draw_tool_pause (GIMP_DRAW_TOOL (vector_tool));
gimp_vectors_freeze (vector_tool->vectors);
while ((cur_stroke = gimp_vectors_stroke_get_next (vector_tool->vectors,
cur_stroke)))
@ -1735,11 +1739,25 @@ gimp_vector_tool_delete_selected_anchors (GimpVectorTool *vector_tool)
cur_anchor = GIMP_ANCHOR (list->data);
if (cur_anchor->selected)
gimp_stroke_anchor_delete (cur_stroke, cur_anchor);
{
if (! have_undo)
{
gimp_vector_tool_undo_push (vector_tool, _("Delete Anchors"));
have_undo = TRUE;
}
gimp_stroke_anchor_delete (cur_stroke, cur_anchor);
if (gimp_stroke_is_empty (cur_stroke))
gimp_vectors_stroke_remove (vector_tool->vectors, cur_stroke);
}
}
g_list_free (anchors);
}
gimp_vectors_thaw (vector_tool->vectors);
gimp_draw_tool_resume (GIMP_DRAW_TOOL (vector_tool));
}
static void