Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
OpenGEODE
Commits
8fd4701a
Commit
8fd4701a
authored
Jun 13, 2018
by
Maxime Perrotin
Browse files
Fix bugs with statechart rendering
- timers were missing - tab activation was buggy when clicked from a nested diagram
parent
4091b36d
Changes
3
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
8fd4701a
...
...
@@ -135,6 +135,10 @@ The background pattern was downloaded from www.subtlepatterns.com
Changelog
=========
2.
0.9 (06/2018)
-
Add timers in statecharts
-
Fix statechart list of signals when tab is activated from a sub-diagram
2.
0.8 (05/2018)
-
Minor bugfix
...
...
opengeode/Statechart.py
View file @
8fd4701a
...
...
@@ -582,7 +582,10 @@ def create_dot_graph(root_ast, basic=False, scene=None, view=None):
diamond
=
0
input_signals
=
{
sig
[
'name'
].
lower
()
for
sig
in
root_ast
.
input_signals
}
# XXX misses the timers
# Add timers, in the statechart they are like other signals
for
each
in
root_ast
.
timers
:
input_signals
.
add
(
each
)
# valid_inputs: list of messages to be displayed in the statecharts
# user can remove them from the file to make cleaner diagrams
...
...
opengeode/opengeode.py
View file @
8fd4701a
...
...
@@ -141,7 +141,7 @@ except ImportError:
__all__
=
[
'opengeode'
,
'SDL_Scene'
,
'SDL_View'
,
'parse'
]
__version__
=
'2.0.
8
'
__version__
=
'2.0.
9
'
if
hasattr
(
sys
,
'frozen'
):
# Detect if we are running on Windows (py2exe-generated)
...
...
@@ -1050,8 +1050,13 @@ class SDL_Scene(QtGui.QGraphicsScene, object):
process_ast
.
input_signals
=
\
sdlSymbols
.
CONTEXT
.
processes
[
0
].
input_signals
except
IndexError
:
# No process context, eg. when called from cmd line
LOG
.
debug
(
"Statechart rendering: no CONTEXT.processes[0]"
)
try
:
process_ast
.
input_signals
=
\
view
.
context_history
[
0
].
processes
[
0
].
input_signals
except
(
AttributeError
,
IndexError
):
# No process context, eg. when called from cmd line
LOG
.
debug
(
"Statechart rendering: no CONTEXT.processes[0]"
)
# Flatten nested states (no, because neato does not support it,
# dot supports only vertically-aligned states, and fdp does not
# support curved edges and is buggy with pygraphviz anyway)
...
...
@@ -2257,7 +2262,7 @@ class SDL_View(QtGui.QGraphicsView, object):
self
.
messages_window
.
addItem
(
'Code generation failed:'
+
str
(
err
))
LOG
.
debug
(
str
(
traceback
.
format_exc
()))
def
generate_qgen_ada
(
self
):
''' Generate Ada code using QGen '''
# If the current scene is a nested one, move to the top parent
...
...
@@ -2291,7 +2296,7 @@ class SDL_View(QtGui.QGraphicsView, object):
'Code generation with QGen failed!'
)
else
:
self
.
messages_window
.
addItem
(
'Done'
)
def
generate_qgen_c
(
self
):
''' Generate C code using QGen '''
# If the current scene is a nested one, move to the top parent
...
...
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