Commit 235b31f3 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Establish proper list of states

parent 59a97144
......@@ -33,4 +33,5 @@ Author: Maxime Perrotin
LICENSE: LGPL - see LICENSE file
CHANGELOG:
1.0.8 - various updates in SDL handler
1.0.7 - fixed bug in value notation parser
......@@ -16,7 +16,7 @@
__author__ = "Maxime Perrotin"
__license__ = "LGPLv3"
__version__ = "1.0.7"
__version__ = "1.0.8"
__url__ = "http://taste.tuxfamily.org"
import sys
......
......@@ -376,10 +376,14 @@ class sdlHandler(QObject):
statenames = get_statenames(context)
def rec_findstates(context, prefix=''):
for each in context.composite_states:
prefix += each.statename + '__'
for name in get_statenames(each):
yield prefix+name
for substate in rec_findstates(each, prefix):
#prefix += each.statename + '.'
if not isinstance(each, opengeode.ogAST.StateAggregation):
# Aggregations are just containers, not states
for name in get_statenames(each):
yield u'{}{}.{}'.format(prefix, each.statename, name)
for substate in rec_findstates(each,
prefix=u'{}{}.'.format(prefix,
each.statename)):
yield substate
statenames.extend(list(rec_findstates(context)))
......@@ -390,7 +394,7 @@ class sdlHandler(QObject):
if aggregates:
statenames.append('(not in state)')
# Add state variables for parelle states in aggregations
# Add state variables for parellel states in aggregations
for agg, substates in aggregates.viewitems():
for each in substates:
row += 1
......
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