editors/ConfTreeNodeEditor.py
changeset 844 ec9e6ef49878
parent 840 980863738cf6
child 846 26836e421e19
equal deleted inserted replaced
843:7e6fb43804a8 844:ec9e6ef49878
   528     
   528     
   529     def GetTextCtrlCallBackFunction(self, textctrl, path, refresh=False):
   529     def GetTextCtrlCallBackFunction(self, textctrl, path, refresh=False):
   530         def OnTextCtrlChanged(event):
   530         def OnTextCtrlChanged(event):
   531             res = self.SetConfNodeParamsAttribute(path, textctrl.GetValue())
   531             res = self.SetConfNodeParamsAttribute(path, textctrl.GetValue())
   532             if res != textctrl.GetValue():
   532             if res != textctrl.GetValue():
   533                 textctrl.ChangeValue(res)
   533                 if isinstance(textctrl, wx.SpinCtrl):
       
   534                     textctrl.SetValue(res)
       
   535                 else:
       
   536                     textctrl.ChangeValue(res)
   534             if refresh:
   537             if refresh:
   535                 wx.CallAfter(self.ParentWindow._Refresh, TITLE, FILEMENU, PROJECTTREE, PAGETITLES)
   538                 wx.CallAfter(self.ParentWindow._Refresh, TITLE, FILEMENU, PROJECTTREE, PAGETITLES)
   536                 wx.CallAfter(self.ParentWindow.SelectProjectTreeItem, self.GetTagName())
   539                 wx.CallAfter(self.ParentWindow.SelectProjectTreeItem, self.GetTagName())
   537             event.Skip()
   540             event.Skip()
   538         return OnTextCtrlChanged
   541         return OnTextCtrlChanged