Changeset a684c64 in sasview for src/sas/sasgui/perspectives/corfunc/corfunc_panel.py
- Timestamp:
- Jul 11, 2016 4:36:55 AM (8 years ago)
- Branches:
- master, 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, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 3560196
- Parents:
- 173ee3a
- git-author:
- Lewis O'Driscoll <lewis.o'driscoll@…> (07/08/16 11:31:43)
- git-committer:
- Lewis O'Driscoll <lewis.o'driscoll@…> (07/11/16 04:36:55)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/corfunc/corfunc_panel.py
r1150083 ra684c64 20 20 'd0': "Average Core Thickness: ", 21 21 'A': "PolyDispersity: ", 22 ' Lc/max': "Filling Fraction: "22 'fill': "Filling Fraction: " 23 23 } 24 24 … … 62 62 self.qmax = (0, 0) 63 63 self.background = 0 64 self.extracted_params = None 64 65 # Dictionary for saving refs to text boxes used to display output data 65 66 self._output_boxes = None … … 97 98 if self.state.background is not None: 98 99 self.set_background(self.state.background) 100 if self.state.outputs is not None and self.state.outputs != {}: 101 self.set_extracted_params(self.state.outputs) 99 102 100 103 def get_state(self): … … 107 110 state.set_saved_state('qmax2_tcl', self.qmax[1]) 108 111 state.set_saved_state('background_tcl', self.background) 112 state.outputs = self.extracted_params 109 113 if self._data is not None: 110 114 state.file = self._data.title … … 134 138 self._calculator.set_data(data) 135 139 # Reset the outputs 136 for key in OUTPUT_STRINGS.keys(): 137 self._output_boxes[key].SetValue("-") 140 self.set_extracted_params(None) 138 141 if self._manager is not None: 139 142 from sas.sasgui.perspectives.corfunc.corfunc import IQ_DATA_LABEL … … 220 223 StatusEvent(status=msg, info="Error")) 221 224 return 222 for key in OUTPUT_STRINGS.keys(): 223 value = params[key] 224 self._output_boxes[key].SetValue(value) 225 self.set_extracted_params(params) 225 226 226 227 def save_project(self, doc=None): … … 257 258 self._background_input.SetValue(str(bg)) 258 259 self._calculator.background = bg 260 261 def set_extracted_params(self, params): 262 self.extracted_params = params 263 if params is None: 264 for key in OUTPUT_STRINGS.keys(): 265 self._output_boxes[key].SetValue('-') 266 else: 267 for key in OUTPUT_STRINGS.keys(): 268 value = params[key] 269 self._output_boxes[key].SetValue(value) 259 270 260 271
Note: See TracChangeset
for help on using the changeset viewer.