summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4d84d19)
raw | patch | inline | side by side (parent: 4d84d19)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Fri, 12 May 2006 22:17:24 +0000 (22:17 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Fri, 12 May 2006 22:17:24 +0000 (22:17 +0000) |
src/nodepath.cpp | patch | blob | history |
diff --git a/src/nodepath.cpp b/src/nodepath.cpp
index 4a9493483dfd4f0060f29dbbf1fc0eb04f96745f..b95ebb031295550b6544b9ba89f6f64d0480be66 100644 (file)
--- a/src/nodepath.cpp
+++ b/src/nodepath.cpp
// 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;
//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)
if (nodepath->subpaths == NULL ||
sp_nodepath_get_node_count(nodepath) < 2) {
SPDocument *document = sp_desktop_document (nodepath->desktop);
- sp_nodepath_destroy(nodepath);
sp_selection_delete();
sp_document_done (document);
return;
sp_nodepath_update_repr(nodepath);
- // if the entire nodepath is removed, delete the selected object.
- if (nodepath->subpaths == NULL ||
- sp_nodepath_get_node_count(nodepath) < 2) {
- sp_nodepath_destroy(nodepath);
- sp_selection_delete();
- return;
- }
-
sp_nodepath_update_statusbar(nodepath);
}