Changeset aa9928e in sasview


Ignore:
Timestamp:
Jan 8, 2019 8:45:47 AM (6 years ago)
Author:
butler
Branches:
master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249
Children:
f0c569d
Parents:
f632247
Message:

Fix behavior of smear buttons

Added check for self.model to _set_smear_buttons and more info logging.
Smear buttons should now be enabled depending on 2D vs 1D, model or not,
and resolution data available or not.

Addresses #1222

File:
1 edited

Legend:

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

    rf632247 raa9928e  
    32373237                    self.enable2D: 
    32383238            self.slit_smearer.Disable() 
    3239             self.pinhole_smearer.Enable(True) 
    32403239            self.default_mask = copy.deepcopy(self.data.mask) 
    3241         else: 
    3242             self.slit_smearer.Enable(True) 
    3243             self.pinhole_smearer.Enable(True) 
     3240            if self.model is not None: 
     3241                self.pinhole_smearer.Enable(True) 
     3242 
     3243        elif self.data.__class__.__name__ == "Data1D": 
     3244            if self.model is not None: 
     3245                self.slit_smearer.Enable(True) 
     3246                self.pinhole_smearer.Enable(True) 
     3247        else: 
     3248            msg="data is not recognized as either 1D or 2D" 
     3249            logger.info(msg) 
    32443250 
    32453251 
Note: See TracChangeset for help on using the changeset viewer.