Changeset 0122b8a in sasview
- Timestamp:
- Apr 28, 2009 5:17:06 PM (16 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 34a0c17
- Parents:
- c097f02
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/fitpage.py
r43d00c4 r0122b8a 17 17 ## event to know the selected fit engine 18 18 (FitterTypeEvent, EVT_FITTER_TYPE) = wx.lib.newevent.NewEvent() 19 (FitStopEvent, EVT_FIT_STOP) = wx.lib.newevent.NewEvent()20 19 _BOX_WIDTH = 76 21 20 … … 58 57 ## to update the panel according to the fit engine type selected 59 58 self.Bind(EVT_FITTER_TYPE,self._on_engine_change) 60 self.Bind(EVT_FIT_STOP,self._on_fit_complete)61 59 62 def _on_fit_complete(self, event): 63 """ 64 When fit is complete ,reset the fit button label. 65 """ 66 #self.btFit.SetLabel("Fit") 67 #self.btFit.Unbind(event=wx.EVT_BUTTON, id=self.btFit.GetId()) 68 #self.btFit.Bind(event=wx.EVT_BUTTON, handler=self._onFit,id=self.btFit.GetId()) 69 pass 70 71 60 72 61 def _on_engine_change(self, event): 73 62 """ … … 491 480 self.manager.onFit() 492 481 ## allow stopping the fit 493 #if self.engine_type=="scipy":494 #self.btFit.SetLabel("Stop")495 #self.btFit.Unbind(event=wx.EVT_BUTTON, id= self.btFit.GetId())496 #self.btFit.Bind(event= wx.EVT_BUTTON, handler=self._StopFit, id=self.btFit.GetId())497 #else:498 #self.btFit.SetLabel("Fit")499 #self.btFit.Bind(event= wx.EVT_BUTTON, handler=self._onFit, id=self.btFit.GetId())482 if self.engine_type=="scipy": 483 self.btFit.SetLabel("Stop") 484 self.btFit.Unbind(event=wx.EVT_BUTTON, id= self.btFit.GetId()) 485 self.btFit.Bind(event= wx.EVT_BUTTON, handler=self._StopFit, id=self.btFit.GetId()) 486 else: 487 self.btFit.SetLabel("Fit") 488 self.btFit.Bind(event= wx.EVT_BUTTON, handler=self._onFit, id=self.btFit.GetId()) 500 489 self.btFit.SetFocus() 501 490 self.sizer5.Layout() … … 509 498 if self.engine_type=="scipy": 510 499 self.manager.stop_fit() 511 self.btFit.Unbind(event=wx.EVT_BUTTON, id=self.btFit.GetId()) 512 self.btFit.Bind(event=wx.EVT_BUTTON, handler=self._onFit,id=self.btFit.GetId()) 513 514 500 self.btFit.Unbind(event=wx.EVT_BUTTON, id=self.btFit.GetId()) 501 self.btFit.Bind(event=wx.EVT_BUTTON, handler=self._onFit,id=self.btFit.GetId()) 502 else: 503 self.btFit.Unbind(event=wx.EVT_BUTTON, id=self.btFit.GetId()) 504 self.btFit.Bind(event= wx.EVT_BUTTON, handler=self._onFit, id=self.btFit.GetId()) 515 505 self.btFit.SetFocus() 516 506 self.sizer5.Layout()
Note: See TracChangeset
for help on using the changeset viewer.