Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
asn1-value-editor
Commits
235b31f3
Commit
235b31f3
authored
Dec 22, 2015
by
Maxime Perrotin
Browse files
Establish proper list of states
parent
59a97144
Changes
3
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
235b31f3
...
...
@@ -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
asn1_value_editor/asn1_value_editor.py
View file @
235b31f3
...
...
@@ -16,7 +16,7 @@
__author__
=
"Maxime Perrotin"
__license__
=
"LGPLv3"
__version__
=
"1.0.
7
"
__version__
=
"1.0.
8
"
__url__
=
"http://taste.tuxfamily.org"
import
sys
...
...
asn1_value_editor/sdlHandler.py
View file @
235b31f3
...
...
@@ -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 parelle
l
states in aggregations
for
agg
,
substates
in
aggregates
.
viewitems
():
for
each
in
substates
:
row
+=
1
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment