Commit 0db554c6 authored by eric pellegrini's avatar eric pellegrini
Browse files

Added raise condition when getting atom_transmutation widget value

parent 95ff53dc
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment