Changeset 682c432 in sasview for src/sas/perspectives/fitting


Ignore:
Timestamp:
Mar 13, 2015 1:23:24 PM (10 years ago)
Author:
krzywon
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:
0ea31ca
Parents:
bb074b3
Message:

Fixed the focus bug associated with #275 where focus wasn't being set on
the fitting pages. Made some cahnges to the cansas reader to be more
explicit and (attempt to) lower the pylint scores.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/perspectives/fitting/fitpage.py

    r2f4b430 r682c432  
    6868        #create a default data for an empty panel 
    6969        self.create_default_data() 
    70         #self._manager.frame.Bind(wx.EVT_SET_FOCUS, self.on_set_focus) 
     70        self._manager.frame.Bind(wx.EVT_SET_FOCUS, self.on_set_focus) 
    7171 
    7272    def enable_fit_button(self): 
     
    7676        flag = check_data_validity(self.data) & (self.model is not None) 
    7777        self.btFit.Enable(flag) 
     78         
     79    def on_set_focus(self, event): 
     80        """ 
     81        Override the basepage focus method to ensure the save flag is set  
     82        properly when focusing on the fit page. 
     83        """ 
     84        flag = check_data_validity(self.data) & (self.model is not None) 
     85        self._set_save_flag(flag) 
     86        self.parent.on_set_focus(event) 
    7887 
    7988    def _fill_data_sizer(self): 
Note: See TracChangeset for help on using the changeset viewer.