diff options
| author | bulia byak <buliabyak@gmail.com> | 2006-05-12 22:17:24 +0000 |
|---|---|---|
| committer | buliabyak <buliabyak@users.sourceforge.net> | 2006-05-12 22:17:24 +0000 |
| commit | f464116ab46463a3748c3933d0d96c789f089736 (patch) | |
| tree | e03ca9d540e3aed1352ee5b52e7ce415f9662ecc /src/nodepath.cpp | |
| parent | added POT file (bug #1397722) (diff) | |
| download | inkscape-f464116ab46463a3748c3933d0d96c789f089736.tar.gz inkscape-f464116ab46463a3748c3933d0d96c789f089736.zip | |
never destroy nodepath from within itself - this leaves an orphaned listener in node-context (fixes a crash)
(bzr r815)
Diffstat (limited to 'src/nodepath.cpp')
| -rw-r--r-- | src/nodepath.cpp | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/nodepath.cpp b/src/nodepath.cpp index 4a9493483..b95ebb031 100644 --- a/src/nodepath.cpp +++ b/src/nodepath.cpp @@ -1878,15 +1878,13 @@ void sp_node_delete_preserve(GList *nodes_to_delete) // 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) @@ -1926,7 +1924,6 @@ void sp_node_selected_delete() 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; @@ -2093,14 +2090,6 @@ sp_node_selected_delete_segment(void) 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); } |
