Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
OpenGEODE
Commits
ec42b0dd
Commit
ec42b0dd
authored
May 14, 2017
by
Maxime Perrotin
Browse files
Add confirmation box when user double clicks on a symbol
To make sure user is aware that (s)he is going to enter a subscene
parent
f6ab2501
Changes
2
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
ec42b0dd
...
...
@@ -141,6 +141,9 @@ The background pattern was downloaded from www.subtlepatterns.com
Changelog
=========
1.
5.34 (05/2017)
-
Fix statechart message selection box
1.
5.33 (04/2017)
-
Fix unicode issue with the simulation code
-
Use -fPIC when building the simulation library
...
...
opengeode/opengeode.py
View file @
ec42b0dd
...
...
@@ -138,7 +138,7 @@ except ImportError:
__all__
=
[
'opengeode'
,
'SDL_Scene'
,
'SDL_View'
,
'parse'
]
__version__
=
'1.5.3
3
'
__version__
=
'1.5.3
4
'
if
hasattr
(
sys
,
'frozen'
):
# Detect if we are running on Windows (py2exe-generated)
...
...
@@ -1817,8 +1817,25 @@ class SDL_View(QtGui.QGraphicsView, object):
item
.
double_click
()
ctx
=
unicode
(
item
.
context_name
)
#__class__.__name__.lower())
if
not
isinstance
(
item
.
nested_scene
,
SDL_Scene
):
item
.
nested_scene
=
\
msg_box
=
QtGui
.
QMessageBox
(
self
)
msg_box
.
setWindowTitle
(
'Create nested symbol'
)
msg_box
.
setText
(
'Do you want to create a new sub-{} ?'
'
\n\n
'
'If you do, you can come back to the '
'current diagram using the up arrow '
'in the menu bar on the top of the '
'screen'
.
format
(
item
.
context_name
))
msg_box
.
setStandardButtons
(
QtGui
.
QMessageBox
.
Yes
|
QtGui
.
QMessageBox
.
Cancel
)
msg_box
.
setDefaultButton
(
QtGui
.
QMessageBox
.
Yes
)
ret
=
msg_box
.
exec_
()
if
ret
==
QtGui
.
QMessageBox
.
Yes
:
item
.
nested_scene
=
\
self
.
scene
().
create_subscene
(
ctx
,
self
.
scene
())
else
:
item
.
edit_text
(
self
.
mapToScene
(
evt
.
pos
()))
return
self
.
go_down
(
item
.
nested_scene
,
name
=
u
"{} {}"
.
format
(
ctx
,
unicode
(
item
)))
else
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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