- Timestamp:
- Dec 3, 2018 5:48:31 AM (6 years ago)
- Branches:
- ESS_GUI_batch_fitting
- Parents:
- d9e7792
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Utilities/GridPanel.py
rc4c4957 r9d23e4c 59 59 model_name = output_data[0][0].model.id 60 60 self.tabWidget.setTabToolTip(0, model_name) 61 self.tabWidget.currentChanged.connect(self.onTabChanged) 61 62 62 63 def closeEvent(self, event): … … 195 196 """ 196 197 rows = [s.row() for s in self.currentTable().selectionModel().selectedRows()] 197 if not rows:198 msg = "Nothing to plot!"199 self.parent.communicate.statusBarUpdateSignal.emit(msg)200 return201 198 data = self.dataFromTable(self.currentTable()) 202 199 # data['Data'] -> ['filename1', 'filename2', ...] … … 210 207 # data messed up. 211 208 return 209 210 def onSelectionChanged(self): 211 """ 212 Deactivates plot if no rows are selected 213 """ 214 selected_rows = len(self.currentTable().selectionModel().selectedRows()) 215 if selected_rows == 0: 216 self.cmdPlot.setEnabled(False) 217 else: 218 self.cmdPlot.setEnabled(True) 219 220 def onTabChanged(self): 221 """ 222 Resets settings when tab is change to avoid problems with plotting 223 """ 224 self.currentTable().selectRow(0) 225 self.cmdPlot.setEnabled(True) 212 226 213 227 @classmethod … … 401 415 # resize content 402 416 widget.resizeColumnsToContents() 417 widget.selectRow(0) 418 widget.itemSelectionChanged.connect(self.onSelectionChanged) 403 419 404 420 @classmethod
Note: See TracChangeset
for help on using the changeset viewer.