Logo Search packages:      
Sourcecode: inkscape version File versions  Download package

void sp_node_selected_break ( Inkscape::NodePath::Path nodepath  ) 

Call sp_nodepath_break() for all selected segments.

Definition at line 2197 of file nodepath.cpp.

References Inkscape::NodePath::Path::selected, sp_nodepath_deselect(), sp_nodepath_node_break(), sp_nodepath_node_select(), sp_nodepath_update_handles(), and sp_nodepath_update_repr().

{
    if (!nodepath) return;

    GList *tempin = g_list_copy(nodepath->selected);
    GList *temp = NULL;
    for (GList *l = tempin; l != NULL; l = l->next) {
       Inkscape::NodePath::Node *n = (Inkscape::NodePath::Node *) l->data;
       Inkscape::NodePath::Node *nn = sp_nodepath_node_break(n);
        if (nn == NULL) continue; // no break, no new node
        temp = g_list_prepend(temp, nn);
    }
    g_list_free(tempin);

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

    sp_nodepath_update_handles(nodepath);

    sp_nodepath_update_repr(nodepath, _("Break path"));
}


Generated by  Doxygen 1.6.0   Back to index