浏览代码

FIX: DependencyGraph: Cycle detection failed for example on 1->2->1.
Using usual cycle detection by checking if vertex has arleady been discovered instead.

Sascha Zelzer 15 年之前
父节点
当前提交
3e71205594
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Libs/Core/ctkDependencyGraph.cpp

+ 1 - 1
Libs/Core/ctkDependencyGraph.cpp

@@ -163,7 +163,7 @@ void ctkDependencyGraph::ctkInternal::traverseUsingDFS(int v)
 //----------------------------------------------------------------------------
 void ctkDependencyGraph::ctkInternal::processEdge(int from, int to)
 {
-  if (this->Parent[from] != to)
+  if (this->Discovered[to] == true)
     {
     this->CycleDetected = true;
     this->CycleOrigin = to;