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
bd389399
Commit
bd389399
authored
Jul 26, 2015
by
Maxime Perrotin
Browse files
Add top_level function to Connections
parent
2f371ac8
Changes
2
Hide whitespace changes
Inline
Side-by-side
opengeode/Connectors.py
View file @
bd389399
...
...
@@ -69,6 +69,11 @@ class Connection(QGraphicsPathItem, object):
''' Compute connection intermediate points - redefine in subclasses '''
return
self
.
_middle_points
def
top_level
(
self
):
''' In case the connection has a text, implement top_level()
as needed by TextInteraction '''
return
self
.
parent
def
simple_arrow
(
self
,
origin
=
'head'
,
path
=
None
):
''' Compute the two points of an vertical arrow head '''
if
origin
==
'head'
:
...
...
opengeode/TextInteraction.py
View file @
bd389399
...
...
@@ -386,8 +386,8 @@ class EditableText(QGraphicsTextItem, object):
def
focusInEvent
(
self
,
event
):
''' When user starts editing text, save previous state for Undo '''
super
(
EditableText
,
self
).
focusInEvent
(
event
)
#
Mak
e the Z-value of items to make sure the
# completer
will
always be on top of other symbols
#
Chang
e the Z-value of items to make sure the
# completer
is
always be on top of other symbols
parent
=
self
.
parentItem
()
top_level
=
parent
.
top_level
()
top_level
.
setZValue
(
top_level
.
zValue
()
+
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