fix error in adding nodes

states were added twice in some cases
This commit is contained in:
Uwe Steinmann 2016-08-31 08:36:53 +02:00
parent 9502b28f08
commit ab1cf7e197

View File

@ -106,7 +106,7 @@ $(document).ready(function() {
echo "ggg.addNode(\"S".$state->getID()."\", { label : \"".str_replace('"', "\\\"", $state->getName()." ".$initstate)."\" });\n";
}
if(!isset($this->states[$nextstate->getID()])) {
$this->states[$state->getID()] = $nextstate;
$this->states[$nextstate->getID()] = $nextstate;
echo "ggg.addNode(\"S".$nextstate->getID()."\", { label : \"".str_replace('"', "\\\"", $nextstate->getName())."\" });\n";
}
}