Explorar el Código

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 hace 15 años
padre
commit
3e71205594
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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;