[Avida-SVN] r1959 - branches/uml/source/main

hjg at myxo.css.msu.edu hjg at myxo.css.msu.edu
Fri Aug 17 21:00:42 PDT 2007


Author: hjg
Date: 2007-08-18 00:00:42 -0400 (Sat, 18 Aug 2007)
New Revision: 1959

Modified:
   branches/uml/source/main/cUMLStateDiagram.cc
Log:
Changed it so that organisms can not add self-transitions


Modified: branches/uml/source/main/cUMLStateDiagram.cc
===================================================================
--- branches/uml/source/main/cUMLStateDiagram.cc	2007-08-17 20:49:30 UTC (rev 1958)
+++ branches/uml/source/main/cUMLStateDiagram.cc	2007-08-18 04:00:42 UTC (rev 1959)
@@ -512,6 +512,9 @@
 		return false;
 	}
 */	
+	// Disable transitions from one state to itself. 
+	
+	if (orig == dest) return false;
 
 	// Check that there is not a duplicate transition
 	if (findTrans(orig, dest, trigger_index, guard_index, action_index)) { 




More information about the Avida-cvs mailing list