Ignore:
Timestamp:
May 23, 2018 3:40:53 AM (6 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/FittingWidget.py

    r57be490 r87dfca4  
    177177 
    178178        # Create logics with data items 
    179         self._logic=[] 
    180179        # Logics.data contains only a single Data1D/Data2D object 
    181         for data_item in value: 
    182             self._logic.append(FittingLogic()) 
    183             self._logic[-1].data = GuiUtils.dataFromItem(data_item) 
     180        if len(value) == 1: 
     181            # single data logic is already defined, update data on it 
     182            self._logic[0].data = GuiUtils.dataFromItem(value[0]) 
     183        else: 
     184            # batch datasets 
     185            for data_item in value: 
     186                logic = FittingLogic(data=GuiUtils.dataFromItem(data_item)) 
     187                self._logic.append(logic) 
    184188 
    185189        # Overwrite data type descriptor 
Note: See TracChangeset for help on using the changeset viewer.