Changeset 711e157 in sasview


Ignore:
Timestamp:
Jul 12, 2016 11:20:23 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:
9f8209b
Parents:
ebfdf4b
Message:

Disable extrapolate button if no data is loaded

File:
1 edited

Legend:

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

    rebfdf4b r711e157  
    6060        self._qmax1_input = None 
    6161        self._qmax2_input = None 
     62        self._extrapolate_btn = None 
    6263        self._transform_btn = None 
    6364        self._extract_btn = None 
     
    578579        controls_sizer = wx.BoxSizer(wx.VERTICAL) 
    579580 
    580         extrapolate_btn = wx.Button(self, wx.NewId(), "Extrapolate") 
     581        self._extrapolate_btn = wx.Button(self, wx.NewId(), "Extrapolate") 
    581582        self._transform_btn = wx.Button(self, wx.NewId(), "Transform") 
    582583        self._extract_btn = wx.Button(self, wx.NewId(), "Compute Parameters") 
     
    586587        self._extract_btn.Disable() 
    587588 
    588         extrapolate_btn.Bind(wx.EVT_BUTTON, self.compute_extrapolation) 
     589        self._extrapolate_btn.Bind(wx.EVT_BUTTON, self.compute_extrapolation) 
    589590        self._transform_btn.Bind(wx.EVT_BUTTON, self.compute_transform) 
    590591        self._extract_btn.Bind(wx.EVT_BUTTON, self.extract_parameters) 
    591592        help_btn.Bind(wx.EVT_BUTTON, self.on_help) 
    592593 
    593         controls_sizer.Add(extrapolate_btn, wx.CENTER | wx.EXPAND) 
     594        controls_sizer.Add(self._extrapolate_btn, wx.CENTER | wx.EXPAND) 
    594595        controls_sizer.Add(self._transform_btn, wx.CENTER | wx.EXPAND) 
    595596        controls_sizer.Add(self._extract_btn, wx.CENTER | wx.EXPAND) 
     
    611612        self._qmax2_input.Disable() 
    612613        self._background_input.Disable() 
     614        self._extrapolate_btn.Disable() 
    613615 
    614616    def _enable_inputs(self): 
     
    620622        self._qmax2_input.Enable() 
    621623        self._background_input.Enable() 
     624        self._extrapolate_btn.Enable() 
    622625 
    623626    def _round_sig_figs(self, x, sigfigs): 
Note: See TracChangeset for help on using the changeset viewer.