Ignore:
Timestamp:
May 23, 2018 3:40:53 AM (4 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
Branches:
ESS_GUI, 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
Children:
c03692f
Parents:
db7d2c7
Message:

Fixed a bug where weighting options would not correctly update on data load

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Perspectives/Fitting/OptionsWidget.py

    r976978b r87dfca4  
    163163        self.chkLogData.setEnabled(False) 
    164164        # Weighting controls 
    165         if isinstance(self.logic.data, Data2D): 
    166             if self.logic.data.err_data is None or\ 
    167                     np.all(err == 1 for err in self.logic.data.err_data) or \ 
    168                     not np.any(self.logic.data.err_data): 
    169                 self.rbWeighting2.setEnabled(False) 
    170                 self.rbWeighting1.setChecked(True) 
    171             else: 
    172                 self.rbWeighting2.setEnabled(True) 
    173                 self.rbWeighting2.setChecked(True) 
     165        if self.logic.di_flag: 
     166            self.rbWeighting2.setEnabled(True) 
     167            self.rbWeighting2.setChecked(True) 
    174168        else: 
    175             if self.logic.data.dy is None or\ 
    176                     np.all(self.logic.data.dy == 1) or\ 
    177                     not np.any(self.logic.data.dy): 
    178                 self.rbWeighting2.setEnabled(False) 
    179                 self.rbWeighting1.setChecked(True) 
    180             else: 
    181                 self.rbWeighting2.setEnabled(True) 
    182                 self.rbWeighting2.setChecked(True) 
     169            self.rbWeighting2.setEnabled(False) 
     170            self.rbWeighting1.setChecked(True) 
    183171 
    184172    def updateQRange(self, q_range_min, q_range_max, npts): 
Note: See TracChangeset for help on using the changeset viewer.