Changeset 43d00c4 in sasview for sansview/perspectives
- Timestamp:
- Apr 27, 2009 3:48:24 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:
- 6963aa3
- Parents:
- 52611f5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/fitpage.py
rda26c1a r43d00c4 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() 19 20 _BOX_WIDTH = 76 20 21 … … 57 58 ## to update the panel according to the fit engine type selected 58 59 self.Bind(EVT_FITTER_TYPE,self._on_engine_change) 60 self.Bind(EVT_FIT_STOP,self._on_fit_complete) 59 61 60 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 61 72 def _on_engine_change(self, event): 62 73 """ … … 480 491 self.manager.onFit() 481 492 ## allow stopping the fit 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())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()) 489 500 self.btFit.SetFocus() 490 501 self.sizer5.Layout() … … 498 509 if self.engine_type=="scipy": 499 510 self.manager.stop_fit() 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()) 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 505 515 self.btFit.SetFocus() 506 516 self.sizer5.Layout()
Note: See TracChangeset
for help on using the changeset viewer.