Changeset 672c0e97 in sasview


Ignore:
Timestamp:
Oct 2, 2018 8:48:46 AM (2 months ago)
Author:
Piotr Rozyczko <piotr.rozyczko@…>
Branches:
ESS_GUI, ESS_GUI_Invariant, ESS_GUI_batch_fitting, ESS_GUI_ordering
Children:
a98014ab
Parents:
bb3e54dc
git-author:
Piotr Rozyczko <piotr.rozyczko@…> (10/02/18 08:48:06)
git-committer:
Piotr Rozyczko <piotr.rozyczko@…> (10/02/18 08:48:46)
Message:

Magnetism is enabled only for selected few models. SASVIEW-1199

File:
1 edited

Legend:

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

    r9562a6b r672c0e97  
    106106    Calc1DFinishedSignal = QtCore.pyqtSignal(dict) 
    107107    Calc2DFinishedSignal = QtCore.pyqtSignal(dict) 
     108 
     109    MAGNETIC_MODELS = ['sphere', 'core_shell_sphere', 'core_multi_shell', 'cylinder', 'parallelepiped'] 
    108110 
    109111    def __init__(self, parent=None, data=None, tab_id=1): 
     
    423425        self.chk2DView.setEnabled(False) 
    424426        self.chk2DView.setVisible(False) 
    425         self.chkMagnetism.setEnabled(self.is2D) 
     427        self.chkMagnetism.setEnabled(False) 
    426428        self.tabFitting.setTabEnabled(TAB_MAGNETISM, self.chkMagnetism.isChecked()) 
    427429        # Combo box or label for file name" 
     
    10091011        if not model: 
    10101012            return 
    1011  
     1013        self.chkMagnetism.setEnabled(self.is2D and model in self.MAGNETIC_MODELS) 
    10121014        # Reset parameters to fit 
    10131015        self.resetParametersToFit() 
     
    21862188            p_kernel = self.kernel_module 
    21872189            # need to reset multiplicity to get the right product 
    2188             p_kernel.multiplicity = p_kernel.multiplicity_info.number 
     2190            if p_kernel.is_multiplicity_model: 
     2191                p_kernel.multiplicity = p_kernel.multiplicity_info.number 
    21892192 
    21902193            p_pars_len = len(p_kernel._model_info.parameters.kernel_parameters) 
     
    31703173        self.cbStructureFactor.setEnabled(enabled) 
    31713174 
    3172         self.chkPolydispersity.setEnabled(enabled) 
    3173         self.chkMagnetism.setEnabled(enabled) 
    3174         self.chk2DView.setEnabled(enabled) 
    3175  
    31763175    def enableInteractiveElements(self): 
    31773176        """ 
Note: See TracChangeset for help on using the changeset viewer.