]> granicus.if.org Git - graphviz/commitdiff
Finish fix. Forgot to handle name in clone function
authorerg <devnull@localhost>
Sun, 22 Nov 2009 19:59:20 +0000 (19:59 +0000)
committererg <devnull@localhost>
Sun, 22 Nov 2009 19:59:20 +0000 (19:59 +0000)
lib/gvpr/actions.c

index e8ec7d422c9abcc90fb47ba98ac6b724a9c5e637..6bee10c4273d29f3052c747167aa3ef3f2409cc8 100644 (file)
@@ -383,11 +383,13 @@ Agobj_t *clone(Agraph_t * g, Agobj_t * obj)
 
     switch (kind) {
     case AGNODE:               /* same as copy node */
+       name = agnameof(obj);
        nobj = (Agobj_t *) openNode(g, name);
        if (nobj)
            copyAttr(obj, nobj);
        break;
     case AGRAPH:
+       name = agnameof(obj);
        if (g)
            nobj = (Agobj_t *) openSubg(g, name);
        else
@@ -401,6 +403,7 @@ Agobj_t *clone(Agraph_t * g, Agobj_t * obj)
        e = (Agedge_t *) obj;
        t = (Agnode_t *) clone(g, OBJ(agtail(e)));
        h = (Agnode_t *) clone(g, OBJ(aghead(e)));
+       name = agnameof (AGMKOUT(e));
        nobj = (Agobj_t *) openEdge(g, t, h, name);
        if (nobj)
            copyAttr(obj, nobj);