Commit c47aa9d2 authored by eric pellegrini's avatar eric pellegrini
Browse files

Added the press Return event for instrument settings dialog

parent 9ea71de9
...@@ -44,7 +44,7 @@ class FloatWidget(StringWidget): ...@@ -44,7 +44,7 @@ class FloatWidget(StringWidget):
sizer = wx.BoxSizer(wx.VERTICAL) sizer = wx.BoxSizer(wx.VERTICAL)
self._float = wx.TextCtrl(self._widgetPanel, wx.ID_ANY, value=str(self._configurator.default)) self._float = wx.TextCtrl(self._widgetPanel, wx.ID_ANY, value=str(self._configurator.default),style=wx.TE_PROCESS_ENTER)
sizer.Add(self._float, 0, wx.ALL, 5) sizer.Add(self._float, 0, wx.ALL, 5)
...@@ -58,3 +58,8 @@ class FloatWidget(StringWidget): ...@@ -58,3 +58,8 @@ class FloatWidget(StringWidget):
raise ConfigurationError("Invalid value for %r entry" % self.name) raise ConfigurationError("Invalid value for %r entry" % self.name)
else: else:
return val return val
@property
def widget(self):
return self._float
\ No newline at end of file
...@@ -112,7 +112,7 @@ class InstrumentResolutionDialog(wx.Dialog): ...@@ -112,7 +112,7 @@ class InstrumentResolutionDialog(wx.Dialog):
self.Bind(wx.EVT_BUTTON, self.on_ok, self._ok) self.Bind(wx.EVT_BUTTON, self.on_ok, self._ok)
self.Bind(wx.EVT_CHOICE, self.on_select_kernel, self._kernelChoice) self.Bind(wx.EVT_CHOICE, self.on_select_kernel, self._kernelChoice)
self.Bind(wx.EVT_CLOSE, self.on_cancel) self.Bind(wx.EVT_CLOSE, self.on_cancel)
@property @property
def value(self): def value(self):
...@@ -172,6 +172,8 @@ class InstrumentResolutionDialog(wx.Dialog): ...@@ -172,6 +172,8 @@ class InstrumentResolutionDialog(wx.Dialog):
self.Freeze() self.Freeze()
self._parametersPanel = ConfigurationPanel(self, resolution) self._parametersPanel = ConfigurationPanel(self, resolution)
for w in self._parametersPanel.widgets.values():
self.Bind(wx.EVT_TEXT_ENTER,self.on_plot_kernel,w.widget)
self._parametersSizer.Add(self._parametersPanel, 0, wx.ALL|wx.EXPAND, 5) self._parametersSizer.Add(self._parametersPanel, 0, wx.ALL|wx.EXPAND, 5)
......
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