diff options
Diffstat (limited to 'src/dotgraph.cpp')
-rw-r--r-- | src/dotgraph.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/dotgraph.cpp b/src/dotgraph.cpp index 287793e..0da1db9 100644 --- a/src/dotgraph.cpp +++ b/src/dotgraph.cpp @@ -316,19 +316,20 @@ void DotGraph::computeGraph(DotNode *root, } root->clearWriteFlag(); root->write(md5stream, gt, format, gt!=CallGraph && gt!=Dependency, TRUE, backArrows); - if (renderParents && root->parents()) + if (renderParents) { - QListIterator<DotNode> dnli(*root->parents()); - const DotNode *pn; - for (dnli.toFirst();(pn=dnli.current());++dnli) + for (const auto &pn : root->parents()) { if (pn->isVisible()) { + const auto &children = pn->children(); + auto child_it = std::find(children.begin(),children.end(),root); + int index = child_it - children.begin(); root->writeArrow(md5stream, // stream gt, // graph type format, // output format pn, // child node - pn->edgeInfo()->at(pn->children()->findRef(root)), // edge info + &pn->edgeInfo()[index], // edge info FALSE, // topDown? backArrows // point back? ); |