Logo Search packages:      
Sourcecode: inkscape version File versions

void sp_node_selected_delete ( void   ) 

Delete one or more selected nodes.

Definition at line 1315 of file nodepath.cpp.

References Path::Path::selected, and Path::Path::subpaths.

{
    Path::Path *nodepath = sp_nodepath_current();
    if (!nodepath) return;
    if (!nodepath->selected) return;

    /* fixme: do it the right way */
    while (nodepath->selected) {
        Path::Node *node = (Path::Node *) nodepath->selected->data;
        sp_nodepath_node_destroy(node);
    }


    //clean up the nodepath (such as for trivial subpaths)
    sp_nodepath_cleanup(nodepath);

    sp_nodepath_ensure_ctrls(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);
}


Generated by  Doxygen 1.6.0   Back to index