summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dot.cpp7
-rw-r--r--src/dot.h1
2 files changed, 7 insertions, 1 deletions
diff --git a/src/dot.cpp b/src/dot.cpp
index 0d8502d..0944a02 100644
--- a/src/dot.cpp
+++ b/src/dot.cpp
@@ -1515,6 +1515,7 @@ DotNode::DotNode(int n,const char *lab,const char *tip, const char *url,
, m_visible(FALSE)
, m_truncated(Unknown)
, m_distance(1000)
+ , m_renumbered(false)
{
}
@@ -2287,7 +2288,11 @@ void DotNode::renumberNodes(int &number)
DotNode *cn;
for (dnlic.toFirst();(cn=dnlic.current());++dnlic)
{
- cn->renumberNodes(number);
+ if (!cn->m_renumbered)
+ {
+ cn->m_renumbered = true;
+ cn->renumberNodes(number);
+ }
}
}
}
diff --git a/src/dot.h b/src/dot.h
index 20a1f29..dc77789 100644
--- a/src/dot.h
+++ b/src/dot.h
@@ -122,6 +122,7 @@ class DotNode
bool m_visible; //!< is the node visible in the output
TruncState m_truncated; //!< does the node have non-visible children/parents
int m_distance; //!< shortest path to the root node
+ bool m_renumbered;//!< indicates if the node has been renumbered (to prevent endless loops)
friend class DotGfxHierarchyTable;
friend class DotClassGraph;