Ignore:
Timestamp:
Apr 6, 2017 5:33:44 AM (8 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:
2155824
Parents:
f182f93
Message:

Allow for multiple datasets to be opened by the fitting perspective

File:
1 edited

Legend:

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

    rb1e36a3 r454670d  
    117117            raise AttributeError, msg 
    118118 
    119         self._model_item = data_item[0] 
     119        for data in data_item: 
     120            # Find the first unassigned tab. 
     121            # If none, open a new tab. 
     122            available_tabs = list(map(lambda tab: tab.acceptsData(), self.tabs)) 
    120123 
    121         # Find the first unassigned tab. 
    122         # If none, open a new tab. 
    123         available_tabs = list(map(lambda tab: tab.acceptsData(), self.tabs)) 
    124  
    125         if numpy.any(available_tabs): 
    126             self.tabs[available_tabs.index(True)].data = data_item 
    127         else: 
    128             self.addFit(data_item) 
     124            if numpy.any(available_tabs): 
     125                self.tabs[available_tabs.index(True)].data = data 
     126            else: 
     127                self.addFit(data) 
Note: See TracChangeset for help on using the changeset viewer.