def refresh(self):
     """Refreshes widgets on the panel."""
     phasepanelutils.refreshTextCtrls(self)
     pairs = self.structure.getSelectedPairs()
     self.textCtrlIncludedPairs.SetValue(pairs)
     phasepanelutils.refreshGrid(self)
     self.restrictConstrainedParameters()
     return
Esempio n. 2
0
 def refresh(self):
     """Refreshes wigets on the panel."""
     # This makes the right thing happen in phasepanelutils. It saves a lot
     # of coding.
     pairs = self.structure.getSelectedPairs()
     self.textCtrlIncludedPairs.SetValue(pairs)
     self.structure = self.results
     phasepanelutils.refreshTextCtrls(self)
     phasepanelutils.refreshGrid(self)
     return
 def onKillFocus(self, event):
     """Check value of TextCtrl and update structure if necessary."""
     if not self.mainFrame: return
     textctrl = event.GetEventObject()
     value = textctrl.GetValue()
     if value != self._focusedText:
         self.applyTextCtrlChange(textctrl.GetId(), value)
         phasepanelutils.refreshTextCtrls(self)
         self.mainFrame.needsSave()
     self._focusedText = None
     return
Esempio n. 4
0
 def onKillFocus(self, event):
     """Check value of TextCtrl and update structure if necessary."""
     if not self.mainFrame: return
     textctrl = event.GetEventObject()
     value = textctrl.GetValue()
     if value != self._focusedText:
         self.applyTextCtrlChange(textctrl.GetId(), value)
         phasepanelutils.refreshTextCtrls(self)
         self.mainFrame.needsSave()
     self._focusedText = None
     event.Skip()
     return
Esempio n. 5
0
 def refresh(self):
     """Refreshes widgets on the panel."""
     phasepanelutils.refreshTextCtrls(self)
     pairs = self.structure.getSelectedPairs()
     self.textCtrlIncludedPairs.SetValue(pairs)
     phasepanelutils.refreshGrid(self)
     self.restrictConstrainedParameters()
     # wxpython 3.0 on Windows 7 prevents textCtrlA from receiving
     # left-click input focus and can be only focused with a Tab key.
     # This only happens for the first input, the text control behaves
     # normally after receiving focus once.
     # Workaround: do explicit focus here for the first rendering.
     if self.__this_is_first_refresh:
         self.__this_is_first_refresh = False
         focusowner = self.textCtrlA.FindFocus()
         wx.CallAfter(self.textCtrlA.SetFocus)
         if focusowner is not None:
             wx.CallAfter(focusowner.SetFocus)
     return
 def refresh(self):
     """Refreshes widgets on the panel."""
     phasepanelutils.refreshTextCtrls(self)
     pairs = self.structure.getSelectedPairs()
     self.textCtrlIncludedPairs.SetValue(pairs)
     phasepanelutils.refreshGrid(self)
     self.restrictConstrainedParameters()
     # wxpython 3.0 on Windows 7 prevents textCtrlA from receiving
     # left-click input focus and can be only focused with a Tab key.
     # This only happens for the first input, the text control behaves
     # normally after receiving focus once.
     # Workaround: do explicit focus here for the first rendering.
     if self.__this_is_first_refresh:
         self.__this_is_first_refresh = False
         focusowner = self.textCtrlA.FindFocus()
         wx.CallAfter(self.textCtrlA.SetFocus)
         if focusowner is not None:
             wx.CallAfter(focusowner.SetFocus)
     return