Logo Search packages:      
Sourcecode: inkscape version File versions

void sp_node_selected_duplicate ( void   ) 

duplicate selected nodes

Duplicate the selected node(s)

Definition at line 1098 of file nodepath.cpp.

References Path::Path::selected.

{
    Path::Path *nodepath = sp_nodepath_current();
    if (!nodepath) {
        return;
    }

    GList *temp = NULL;
    for (GList *l = nodepath->selected; l != NULL; l = l->next) {
        Path::Node *n = (Path::Node *) l->data;
        Path::Node *nn = sp_nodepath_node_duplicate(n);
        if (nn == NULL) continue; // could not duplicate
        temp = g_list_prepend(temp, nn);
    }

    if (temp) {
        sp_nodepath_deselect(nodepath);
    }
    for (GList *l = temp; l != NULL; l = l->next) {
        sp_nodepath_node_select((Path::Node *) l->data, TRUE, TRUE);
    }

    sp_nodepath_ensure_ctrls(nodepath);

    update_repr(nodepath);
}


Generated by  Doxygen 1.6.0   Back to index