summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2c9c683)
raw | patch | inline | side by side (parent: 2c9c683)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Fri, 12 May 2006 20:09:24 +0000 (20:09 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Fri, 12 May 2006 20:09:24 +0000 (20:09 +0000) |
src/nodepath.cpp | patch | blob | history |
diff --git a/src/nodepath.cpp b/src/nodepath.cpp
index 9be8b4ff2ed83eb2fa359573e3b07b789b3aced5..4a9493483dfd4f0060f29dbbf1fc0eb04f96745f 100644 (file)
--- a/src/nodepath.cpp
+++ b/src/nodepath.cpp
sp_nodepath_update_handles(nodepath);
+ if (!g_slist_find(nodepaths, nodepath))
+ nodepaths = g_slist_prepend (nodepaths, nodepath);
+ }
+
+ for (GSList *i = nodepaths; i; i = i->next) {
+ // FIXME: when/if we teach node tool to have more than one nodepath, deleting nodes from
+ // different nodepaths will give us one undo event per nodepath
+ Inkscape::NodePath::Path *nodepath = (Inkscape::NodePath::Path *) i->data;
// if the entire nodepath is removed, delete the selected object.
if (nodepath->subpaths == NULL ||
+ //FIXME: a closed path CAN legally have one node, it's only an open one which must be
+ //at least 2
sp_nodepath_get_node_count(nodepath) < 2) {
SPDocument *document = sp_desktop_document (nodepath->desktop);
sp_nodepath_destroy(nodepath);
g_list_free(nodes_to_delete);
nodes_to_delete = NULL;
- //is the next line necessary?
+ //FIXME: The following line will be wrong when we have mltiple nodepaths: we only want to
+ //delete this nodepath's object, not the entire selection! (though at this time, this
+ //does not matter)
sp_selection_delete();
sp_document_done (document);
- return;
+ } else {
+ sp_nodepath_update_repr(nodepath);
+ sp_nodepath_update_statusbar(nodepath);
}
-
- if (!g_slist_find(nodepaths, nodepath))
- nodepaths = g_slist_prepend (nodepaths, nodepath);
}
- for (GSList *i = nodepaths; i; i = i->next) {
- Inkscape::NodePath::Path *nodepath = (Inkscape::NodePath::Path *) i->data;
- sp_nodepath_update_repr(nodepath);
- sp_nodepath_update_statusbar(nodepath);
- }
+ g_slist_free (nodepaths);
}
/**