Changeset 54a0989 in sasview for src/sas/sasgui/perspectives


Ignore:
Timestamp:
Jul 11, 2016 4:36:55 AM (8 years ago)
Author:
lewis
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, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
6970e51
Parents:
7a219e3e
git-author:
Lewis O'Driscoll <lewis.o'driscoll@…> (07/07/16 11:52:06)
git-committer:
Lewis O'Driscoll <lewis.o'driscoll@…> (07/11/16 04:36:55)
Message:

Disable inputs when no data has been loaded

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/perspectives/corfunc/corfunc_panel.py

    r7a219e3e r54a0989  
    5656        self.state = None 
    5757        self._do_layout() 
     58        self._disable_inputs() 
    5859        self.set_state() 
    5960        self._qmin_input.Bind(wx.EVT_TEXT, self._on_enter_input) 
     
    111112        :param data: The data that has been loaded 
    112113        """ 
    113         self._transform_btn.Disable() 
    114114        if data is None: 
    115115            return 
     116        self._enable_inputs() 
     117        self._transform_btn.Disable() 
    116118        self._data_name_box.SetValue(str(data.title)) 
    117119        self._data = data 
     
    442444 
    443445        self.SetSizer(vbox) 
     446 
     447    def _disable_inputs(self): 
     448        self._qmin_input.Disable() 
     449        self._qmax1_input.Disable() 
     450        self._qmax2_input.Disable() 
     451        self._background_input.Disable() 
     452 
     453    def _enable_inputs(self): 
     454        self._qmin_input.Enable() 
     455        self._qmax1_input.Enable() 
     456        self._qmax2_input.Enable() 
     457        self._background_input.Enable() 
Note: See TracChangeset for help on using the changeset viewer.