Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Scientific Software
MDANSE
Commits
0db554c6
Commit
0db554c6
authored
Nov 17, 2015
by
eric pellegrini
Browse files
Added raise condition when getting atom_transmutation widget value
parent
95ff53dc
Changes
1
Hide whitespace changes
Inline
Side-by-side
MDANSE/Framework/Widgets/AtomTransmutationWidget.py
View file @
0db554c6
...
...
@@ -34,6 +34,7 @@ import wx
from
MDANSE
import
ELEMENTS
from
MDANSE.Framework.Configurable
import
ConfigurationError
from
MDANSE.Framework.UserDefinitionStore
import
UD_STORE
from
MDANSE.Framework.Widgets.AtomSelectionWidget
import
AtomSelectionWidget
from
MDANSE.GUI.Icons
import
ICONS
...
...
@@ -81,10 +82,13 @@ class AtomTransmutationWidget(AtomSelectionWidget):
panel
=
sizerItem
.
GetWindow
()
children
=
panel
.
GetChildren
()
udName
=
children
[
0
]
element
=
children
[
2
]
udName
=
children
[
0
]
.
GetStringSelection
()
element
=
children
[
2
]
.
GetStringSelection
()
uds
.
append
([
udName
.
GetStringSelection
(),
element
.
GetStringSelection
])
if
not
element
:
raise
ConfigurationError
(
"No target element provided for %r selection."
%
udName
)
uds
.
append
([
udName
,
element
])
if
not
uds
:
return
None
...
...
Write
Preview
Markdown
is supported
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