Commit a8887401 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Further support nested states

parent 5f8ce0e9
......@@ -626,7 +626,6 @@ class sdlHandler(QObject):
context = self.proc
def find_allowed_tc(context, statename):
print context.mapping.keys()
inputs = context.mapping[statename.lower()]
for each in inputs:
for inp in each.inputlist:
......@@ -635,18 +634,15 @@ class sdlHandler(QObject):
allowed_tc = list(find_allowed_tc(context, st_iter))
while len(st):
# Handle state composition (without flattening)
# Handle state composition
next_st = st.pop(0)
for each in context.composite_states:
if each.statename.lower() == st_iter.lower():
context = each
break
allowed_tc.extend(list(find_allowed_tc(context, next_st)))
st_iter = next_st
# inputs = self.proc.mapping[st.lower()]
# allowed_tc = []
# for each in inputs:
# allowed_tc.extend(each.inputlist)
# Remove timers from the list
allowed_tc = set(allowed_tc) - set(self.proc.timers)
# Enable/disable the parameterless TC buttons accordingly
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment