Changeset c0a3b22e in sasview for src/sas/qtgui


Ignore:
Timestamp:
Sep 3, 2018 1:42:34 PM (6 years ago)
Author:
piotr
Branches:
ESS_GUI, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
Children:
0d72cac, 1f646618
Parents:
d686ff1
Message:

Guard against improper types of Data - SASVIEW-1012

File:
1 edited

Legend:

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

    re20870bc rc0a3b22e  
    127127        Callback for running the mask editor 
    128128        """ 
    129         self.parent.communicate.maskEditorSignal.emit(self.logic.data) 
    130         pass 
     129        if isinstance(self.logic.data, Data2D): 
     130            self.parent.communicate.maskEditorSignal.emit(self.logic.data) 
    131131 
    132132    def onRangeReset(self): 
     
    157157        Enable/disable various UI elements based on data loaded 
    158158        """ 
     159        is2Ddata = isinstance(self.logic.data, Data2D) 
    159160        self.boxWeighting.setEnabled(True) 
    160         self.cmdMaskEdit.setEnabled(True) 
     161        self.cmdMaskEdit.setEnabled(is2Ddata) 
    161162        # Switch off txtNpts related controls 
    162163        self.txtNpts.setEnabled(False) 
Note: See TracChangeset for help on using the changeset viewer.