diff pyink/domview.py @ 1501:4a57650bb926

Apply changes returned from transition editor
author Thinker K.F. Li <thinker@codemud.net>
date Wed, 04 May 2011 13:34:36 +0800
parents 2a9b9c281f80
children f185a9d23a30
line wrap: on
line diff
--- a/pyink/domview.py	Wed May 04 00:45:49 2011 +0800
+++ b/pyink/domview.py	Wed May 04 13:34:36 2011 +0800
@@ -308,6 +308,16 @@
         transitions = self.transitions
         transition = transitions[cond]
         return transition
+
+    def chg_transition_cond(self, cond, new_cond):
+        transitions = self.transitions
+        
+        trn = transitions[cond]
+        trn.set_condition(new_cond)
+        
+        del transitions[cond]
+        transitions[new_cond] = trn
+        pass
     pass
 
 
@@ -1177,6 +1187,11 @@
         trn = state.get_transition(cond)
         trn.set_path(path)
         pass
+
+    def chg_transition_cond(self, state_name, cond, new_cond):
+        state = self._get_state(state_name)
+        state.chg_transition_cond(cond, new_cond)
+        pass
     pass