From 444d1533516fca40805d43b69e0042b944fcba70 Mon Sep 17 00:00:00 2001 From: buliabyak Date: Mon, 2 Apr 2007 16:56:18 +0000 Subject: [PATCH] fix 1675213: update symm nodes when moving with Ctrl and when adding new node --- src/nodepath.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/nodepath.cpp b/src/nodepath.cpp index 1b67944d8..a73661447 100644 --- a/src/nodepath.cpp +++ b/src/nodepath.cpp @@ -745,8 +745,10 @@ static Inkscape::NodePath::Node *sp_nodepath_line_add_node(Inkscape::NodePath::N &start->pos, &start->pos, &start->n.pos); sp_nodepath_line_midpoint(newnode, end, t); + sp_node_adjust_handles(start); sp_node_update_handles(start); sp_node_update_handles(newnode); + sp_node_adjust_handles(end); sp_node_update_handles(end); return newnode; @@ -3450,12 +3452,14 @@ static void node_handle_moved(SPKnot *knot, NR::Point *p, guint state, gpointer } if (( n->type !=Inkscape::NodePath::NODE_CUSP || (state & GDK_SHIFT_MASK)) - && rme.a != HUGE_VAL && rnew.a != HUGE_VAL && fabs(rme.a - rnew.a) > 0.001) { + && rme.a != HUGE_VAL && rnew.a != HUGE_VAL && (fabs(rme.a - rnew.a) > 0.001 || n->type ==Inkscape::NodePath::NODE_SYMM)) { // rotate the other handle correspondingly, if both old and new angles exist and are not the same rother.a += rnew.a - rme.a; other->pos = NR::Point(rother) + n->pos; - sp_ctrlline_set_coords(SP_CTRLLINE(other->line), n->pos, other->pos); - sp_knot_set_position(other->knot, &other->pos, 0); + if (other->knot) { + sp_ctrlline_set_coords(SP_CTRLLINE(other->line), n->pos, other->pos); + sp_knot_moveto(other->knot, &other->pos); + } } me->pos = NR::Point(rnew) + n->pos; -- 2.30.2