Changeset 1970780 in sasview for src/sas/qtgui/DataExplorer.py
- Timestamp:
- Apr 9, 2017 5:33:01 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:
- 9208346
- Parents:
- 71361f0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/DataExplorer.py
r71361f0 r1970780 24 24 from sas.qtgui.DroppableDataLoadWidget import DroppableDataLoadWidget 25 25 from sas.qtgui.MaskEditor import MaskEditor 26 27 import Perspectives 26 28 27 29 class DataExplorerWindow(DroppableDataLoadWidget): … … 91 93 self.cbgraph.currentIndexChanged.connect(self.enableGraphCombo) 92 94 93 self._perspective = self.parent.perspective()94 95 95 # Proxy model for showing a subset of Data1D/Data2D content 96 96 self.data_proxy = QtGui.QSortFilterProxyModel(self) … … 151 151 Populate the Perspective combobox and define callbacks 152 152 """ 153 available_perspectives = sorted([p for p in Perspectives.PERSPECTIVES.keys()]) 154 if available_perspectives: 155 self.cbFitting.clear() 156 self.cbFitting.addItems(available_perspectives) 153 157 self.cbFitting.currentIndexChanged.connect(self.updatePerspectiveCombo) 154 158 # Set the index so we see the default (Fitting) 155 159 self.updatePerspectiveCombo(0) 160 161 def _perspective(self): 162 """ 163 Returns the current perspective 164 """ 165 return self.parent.perspective() 156 166 157 167 def loadFromURL(self, url): … … 313 323 Send selected item data to the current perspective and set the relevant notifiers 314 324 """ 315 # should this reside on GuiManager or here?316 self._perspective = self.parent.perspective()317 318 325 # Set the signal handlers 319 326 self.communicator.updateModelFromPerspectiveSignal.connect(self.updateModelFromPerspective) … … 332 339 333 340 # Which perspective has been selected? 334 if len(selected_items) > 1 and not self._perspective .allowBatch():335 msg = self._perspective .title() + " does not allow multiple data."341 if len(selected_items) > 1 and not self._perspective().allowBatch(): 342 msg = self._perspective().title() + " does not allow multiple data." 336 343 msgbox = QtGui.QMessageBox() 337 344 msgbox.setIcon(QtGui.QMessageBox.Critical) … … 342 349 343 350 # Notify the GuiManager about the send request 344 self._perspective .setData(data_item=selected_items)351 self._perspective().setData(data_item=selected_items) 345 352 346 353 def freezeTheory(self, event): … … 424 431 """ 425 432 self.communicator.perspectiveChangedSignal.emit(self.cbFitting.currentText()) 433 self.chkBatch.setEnabled(self.parent.perspective().allowBatch()) 426 434 427 435 def newPlot(self):
Note: See TracChangeset
for help on using the changeset viewer.