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:
@ -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>
|
2004-06-27 Bill Skaggs <weskaggs@primate.ucdavis.edu>
|
||||||
|
|
||||||
* app/tools/gimplevelstool.c: removed two small chunks of code.
|
* app/tools/gimplevelstool.c: removed two small chunks of code.
|
||||||
|
@ -1721,8 +1721,12 @@ gimp_vector_tool_delete_selected_anchors (GimpVectorTool *vector_tool)
|
|||||||
{
|
{
|
||||||
GimpAnchor *cur_anchor;
|
GimpAnchor *cur_anchor;
|
||||||
GimpStroke *cur_stroke = NULL;
|
GimpStroke *cur_stroke = NULL;
|
||||||
GList *anchors;
|
GList *anchors;
|
||||||
GList *list;
|
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,
|
while ((cur_stroke = gimp_vectors_stroke_get_next (vector_tool->vectors,
|
||||||
cur_stroke)))
|
cur_stroke)))
|
||||||
@ -1735,11 +1739,25 @@ gimp_vector_tool_delete_selected_anchors (GimpVectorTool *vector_tool)
|
|||||||
cur_anchor = GIMP_ANCHOR (list->data);
|
cur_anchor = GIMP_ANCHOR (list->data);
|
||||||
|
|
||||||
if (cur_anchor->selected)
|
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);
|
g_list_free (anchors);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gimp_vectors_thaw (vector_tool->vectors);
|
||||||
|
gimp_draw_tool_resume (GIMP_DRAW_TOOL (vector_tool));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Reference in New Issue
Block a user