Ignore:
File:
1 edited

Legend:

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

    r3e8dee3 r53c771e  
    1818#from PyQt5 import QtWebEngineWidgets 
    1919 
     20from sasmodels import product 
    2021from sasmodels import generate 
    2122from sasmodels import modelinfo 
     
    151152    def data(self, value): 
    152153        """ data setter """ 
     154        # Value is either a list of indices for batch fitting or a simple index 
     155        # for standard fitting. Assure we have a list, regardless. 
    153156        if isinstance(value, list): 
    154157            self.is_batch_fitting = True 
     
    164167 
    165168        # Update logics with data items 
     169        # Logics.data contains only a single Data1D/Data2D object 
    166170        self.logic.data = GuiUtils.dataFromItem(value[0]) 
    167171 
     
    169173        self.is2D = True if isinstance(self.logic.data, Data2D) else False 
    170174 
     175        # Let others know we're full of data now 
    171176        self.data_is_loaded = True 
    172177 
     
    348353        self.chk2DView.setVisible(False) 
    349354        self.chkMagnetism.setEnabled(self.is2D) 
     355        self.tabFitting.setTabEnabled(TAB_MAGNETISM, self.is2D) 
    350356        # Combo box or label for file name" 
    351357        if self.is_batch_fitting: 
     
    12821288        structure_module = generate.load_kernel_module(structure_factor) 
    12831289        structure_parameters = modelinfo.make_parameter_table(getattr(structure_module, 'parameters', [])) 
     1290        structure_kernel = self.models[structure_factor]() 
     1291 
     1292        self.kernel_module._model_info = product.make_product_info(self.kernel_module._model_info, structure_kernel._model_info) 
    12841293 
    12851294        new_rows = FittingUtilities.addSimpleParametersToModel(structure_parameters, self.is2D) 
Note: See TracChangeset for help on using the changeset viewer.