Ignore:
Timestamp:
Aug 9, 2017 9:52:07 AM (7 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
Branches:
ESS_GUI, ESS_GUI_Docs, 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:
38eb433
Parents:
985ad94
Message:

Initial setup for batch fitting. SASVIEW-615

File:
1 edited

Legend:

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

    rb0c5e8c ree18d33  
    9797            event.ignore() 
    9898 
    99     def addFit(self, data): 
     99    def addFit(self, data, is_batch=False): 
    100100        """ 
    101101        Add a new tab for passed data 
    102102        """ 
    103103        tab     = FittingWidget(parent=self.parent, data=data, tab_id=self.maxIndex+1) 
     104        tab.is_batch_fitting = is_batch 
    104105        # Add this tab to the object library so it can be retrieved by scripting/jupyter 
    105106        ObjectLibrary.addObject(self.tabName(), tab) 
     
    133134        return True 
    134135 
    135     def setData(self, data_item=None): 
     136    def setData(self, data_item=None, is_batch=False): 
    136137        """ 
    137138        Assign new dataset to the fitting instance 
     
    149150            raise AttributeError, msg 
    150151 
    151         for data in data_item: 
     152        items = [data_item] if is_batch else data_item 
     153 
     154        for data in items: 
    152155            # Find the first unassigned tab. 
    153156            # If none, open a new tab. 
     
    157160                self.tabs[available_tabs.index(True)].data = data 
    158161            else: 
    159                 self.addFit(data) 
     162                self.addFit(data, is_batch=is_batch) 
    160163 
    161164    def onFittingOptionsChange(self, fit_engine): 
Note: See TracChangeset for help on using the changeset viewer.