Changeset 68c96d3 in sasview
- Timestamp:
- Mar 1, 2017 5:17:07 AM (8 years ago)
- 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:
- 6f7f652
- Parents:
- f46f6dc
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Fitting/FittingPerspective.py
rf46f6dc r68c96d3 73 73 return True 74 74 75 def setData(self, data =None):75 def setData(self, data_item=None): 76 76 """ 77 77 Assign new dataset to the fitting instance 78 78 """ 79 assert(data is not None)79 assert(data_item is not None) 80 80 81 # find an unassigned tab. 82 # if none, open a new tab. 83 tab_to_send = None 84 for tab in self.tabs: 85 if tab.acceptsData(): 86 tab_to_send = tab 87 break 88 # send data 89 if tab_to_send is None: 90 self.addFit(data) 81 # Find an unassigned tab. 82 # If none, open a new tab. 83 available_tabs = list(map(lambda tab:tab.acceptsData(), self.tabs)) 84 85 if True in available_tabs: 86 self.tabs[available_tabs.index(True)].data = data_item 91 87 else: 92 tab_to_send.data = data93 pass 88 self.addFit(data_item) 89 94 90 95 91 if __name__ == "__main__":
Note: See TracChangeset
for help on using the changeset viewer.