summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2a959ff)
raw | patch | inline | side by side (parent: 2a959ff)
author | johncoswell <johncoswell@users.sourceforge.net> | |
Mon, 4 Sep 2006 15:51:48 +0000 (15:51 +0000) | ||
committer | johncoswell <johncoswell@users.sourceforge.net> | |
Mon, 4 Sep 2006 15:51:48 +0000 (15:51 +0000) |
src/nodepath.cpp | patch | blob | history | |
src/nodepath.h | patch | blob | history |
diff --git a/src/nodepath.cpp b/src/nodepath.cpp
index 3398ac1a1267bfd78eae70754fb2e71195ffa5e6..067cf5435428d6a2b2452d900532bd464ffaa652 100644 (file)
--- a/src/nodepath.cpp
+++ b/src/nodepath.cpp
}
for (GList *l = nodepath->selected; l != NULL; l = l->next) {
- Inkscape::NodePath::Node *n = (Inkscape::NodePath::Node *) l->data;
+ Inkscape::NodePath::Node *n = (Inkscape::NodePath::Node *) l->data;
sp_node_moveto(n, n->pos + best_pt);
}
sp_nodepath_node_select(n, (state & GDK_SHIFT_MASK), FALSE);
}
+ n->is_dragging = true;
+
sp_nodepath_remember_origins (n->subpath->nodepath);
}
Inkscape::NodePath::Node *n = (Inkscape::NodePath::Node *) data;
n->dragging_out = NULL;
+ n->is_dragging = false;
sp_nodepath_update_repr(n->subpath->nodepath, _("Move nodes"));
}
}
}
} else { // move freely
- if (state & GDK_MOD1_MASK) { // sculpt
- sp_nodepath_selected_nodes_sculpt(n->subpath->nodepath, n, (*p) - n->origin);
- } else {
- sp_nodepath_selected_nodes_move(n->subpath->nodepath,
- (*p)[NR::X] - n->pos[NR::X],
- (*p)[NR::Y] - n->pos[NR::Y],
- (state & GDK_SHIFT_MASK) == 0);
- }
+ if (n->is_dragging) {
+ if (state & GDK_MOD1_MASK) { // sculpt
+ sp_nodepath_selected_nodes_sculpt(n->subpath->nodepath, n, (*p) - n->origin);
+ } else {
+ sp_nodepath_selected_nodes_move(n->subpath->nodepath,
+ (*p)[NR::X] - n->pos[NR::X],
+ (*p)[NR::Y] - n->pos[NR::Y],
+ (state & GDK_SHIFT_MASK) == 0);
+ }
+ }
}
n->subpath->nodepath->desktop->scroll_to_point(p);
diff --git a/src/nodepath.h b/src/nodepath.h
index 21c2957aa92f3d36a057446b88b760ed63cc72d3..85674003833d128e80f2d65db3af15b86cfd4a67 100644 (file)
--- a/src/nodepath.h
+++ b/src/nodepath.h
/** The pointer to the nodeside which we are dragging out with Shift */
NodeSide *dragging_out;
+
+ /** Boolean. Am I being dragged? */
+ guint is_dragging : 1;
};
} // namespace NodePath