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
eb06239f
Commit
eb06239f
authored
Oct 13, 2014
by
Maxime Perrotin
Browse files
Update the State autocompletion list
parent
89214105
Changes
3
Hide whitespace changes
Inline
Side-by-side
genericSymbols.py
View file @
eb06239f
...
...
@@ -251,7 +251,6 @@ class Symbol(QObject, QGraphicsPathItem, object):
import
traceback
print
traceback
.
print_stack
()
raise
TypeError
(
'Use unicode() not str()'
)
#return str(self.text) or 'no_name'
def
__unicode__
(
self
):
''' Return the text inside the symbol '''
...
...
opengeode.py
View file @
eb06239f
...
...
@@ -570,7 +570,7 @@ class SDL_Scene(QtGui.QGraphicsScene, object):
''' When text has changed on a symbol, update the data dictionnary '''
pr_text
=
'
\n
'
.
join
(
Pr
.
generate
(
symbol
,
recursive
=
False
,
nextstate
=
False
))
nextstate
=
False
,
cpy
=
True
))
symbol
.
update_completion_list
(
pr_text
=
pr_text
)
def
find_text
(
self
,
pattern
):
...
...
sdlSymbols.py
View file @
eb06239f
...
...
@@ -781,14 +781,15 @@ class State(VerticalSymbol):
def
update_completion_list
(
self
,
pr_text
):
''' When text was entered, update state completion list '''
# Get AST for the symbol
# Get AST for the symbol
and update the context dictionnary
ast
,
_
,
_
,
_
,
_
=
self
.
parser
.
parseSingleElement
(
'state'
,
pr_text
)
#State.completion_list |= set(ast.statelist)
for
each
in
ast
.
statelist
:
CONTEXT
.
mapping
[
each
]
=
None
@
property
def
completion_list
(
self
):
''' Set auto-completion list '''
return
(
state
for
state
in
CONTEXT
.
mapping
if
state
!=
'START'
)
return
set
(
state
for
state
in
CONTEXT
.
mapping
if
state
!=
'START'
)
def
set_shape
(
self
,
width
,
height
):
''' Compute the polygon to fit in width, height '''
...
...
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