7f396ae51fb175f8a7785556f329d3391596b4b0 braney Mon Feb 23 16:07:03 2015 -0800 fix duplicated lines in group menu bug #14878 diff --git src/hg/lib/grp.c src/hg/lib/grp.c index e973232..6f118aa 100644 --- src/hg/lib/grp.c +++ src/hg/lib/grp.c @@ -191,15 +191,27 @@ *pList = newList; } void grpSuperimpose(struct grp **listA, struct grp **listB) /* Replace all the grps in listA with the same names of those in * listB. Ones in B that aren't the same get put in A too. * The function returns with the new list A, and the empty list * B. */ { while (*listB != NULL) { struct grp *newone = slPopHead(listB); replaceOrAdd(listA, newone); } } + +struct grp *grpDup(struct grp *oldGroup) +/* duplicate a grp structure */ +{ +struct grp *grp; +AllocVar(grp); +grp->name = cloneString(oldGroup->name); +grp->label = cloneString(oldGroup->label); +grp->defaultIsClosed = oldGroup->defaultIsClosed; +grp->priority = oldGroup->priority; +return grp; +}