Commit 9a91a385 authored by eric pellegrini's avatar eric pellegrini
Browse files

Removed widget hihhligh when validate fails

parent 028dc584
......@@ -47,20 +47,12 @@ class ConfigurationPanel(wx.Panel):
return dict([(k,v.get_value()) for k,v in self._widgets.items()])
def validate(self):
for w in self._widgets.values():
w.SetBackgroundColour(wx.NullColour)
w.Refresh()
parameters = {}
parameters.update(self.get_value())
try:
parameters.update(self.get_value())
except ConfiguratorError as e:
d = wx.MessageDialog(self, str(e), style=wx.ICON_ERROR|wx.STAY_ON_TOP|wx.CENTRE)
d.ShowModal()
w = self._widgets[e.configurator.name]
w.SetBackgroundColour("Pink")
w.Refresh()
w.SetFocus()
wx.MessageBox(self, str(e), "Invalid input", style=wx.ICON_ERROR|wx.OK)
finally:
return parameters
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