Changeset c4c4957 in sasview for src/sas/qtgui/Utilities
- Timestamp:
- Nov 20, 2018 4:06:25 AM (6 years ago)
- Branches:
- ESS_GUI, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
- Children:
- be7c981
- Parents:
- 8c85ac1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Utilities/GridPanel.py
r75906a1 rc4c4957 126 126 return 127 127 128 def addTabPage(self ):128 def addTabPage(self, name=None): 129 129 """ 130 130 Add new tab page with QTableWidget … … 141 141 # However, some models have LONG names, which doesn't look well on the tab bar. 142 142 self.tab_number += 1 143 tab_name = "Tab " + str(self.tab_number) 143 if name is not None: 144 tab_name = name 145 else: 146 tab_name = "Tab " + str(self.tab_number) 144 147 # each table needs separate slots. 145 148 tab_widget.customContextMenuRequested.connect(self.showContextMenu) … … 153 156 Create a new tab with batch fitting results 154 157 """ 158 # pull out page name from results 159 page_name = None 160 if len(results)>=2: 161 if isinstance(results[-1], str): 162 page_name = results[-1] 163 _ = results.pop(-1) 164 155 165 if self.has_data: 156 self.addTabPage() 166 self.addTabPage(name=page_name) 167 else: 168 self.tabWidget.setTabText(0, page_name) 157 169 # Update the new widget 158 170 # Fill in the table from input data in the last/newest page
Note: See TracChangeset
for help on using the changeset viewer.