Changeset 43d00c4 in sasview


Ignore:
Timestamp:
Apr 27, 2009 1:48:24 PM (16 years ago)
Author:
Gervaise Alina <gervyh@…>
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
Message:

remove stop button

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansview/perspectives/fitting/fitpage.py

    rda26c1a r43d00c4  
    1717## event to know the selected fit engine 
    1818(FitterTypeEvent, EVT_FITTER_TYPE)   = wx.lib.newevent.NewEvent() 
     19(FitStopEvent, EVT_FIT_STOP)   = wx.lib.newevent.NewEvent() 
    1920_BOX_WIDTH = 76 
    2021 
     
    5758        ## to update the panel according to the fit engine type selected 
    5859        self.Bind(EVT_FITTER_TYPE,self._on_engine_change) 
     60        self.Bind(EVT_FIT_STOP,self._on_fit_complete) 
    5961     
    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         
    6172    def _on_engine_change(self, event): 
    6273        """ 
     
    480491        self.manager.onFit() 
    481492        ## 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()) 
    489500        self.btFit.SetFocus()     
    490501        self.sizer5.Layout() 
     
    498509        if self.engine_type=="scipy": 
    499510            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             
    505515        self.btFit.SetFocus()     
    506516        self.sizer5.Layout() 
Note: See TracChangeset for help on using the changeset viewer.