Changeset fa487d93 in sasview for src/sas/sasgui/perspectives/fitting
- Timestamp:
- Dec 21, 2016 11:59:49 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:
- 2d09bc2
- Parents:
- a6fccd7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/fitting/pagestate.py
r9e0aa69a rfa487d93 351 351 obj.cb1 = copy.deepcopy(self.cb1) 352 352 obj.smearer = copy.deepcopy(self.smearer) 353 obj.version = copy.deepcopy(self.version) 353 354 354 355 for name, state in self.saved_states.iteritems(): … … 479 480 self.str_parameters, True) 480 481 formfactor, str_params = convert.convert_model( 481 self.formfactorcombobox, str_pars )482 self.formfactorcombobox, str_pars, False, self.version) 482 483 for key, value in str_params.iteritems(): 483 484 params[key] = value 484 485 485 # Only convert if old != new, otherwise all the same 486 if formfactor != self.formfactorcombobox or \ 487 structurefactor != self.structurecombobox: 488 # Spherical SLD number of layers changed between 3.1.2 and 4.0 489 if self.formfactorcombobox == 'SphericalSLDModel': 490 self.multi_factor += 1 491 self.formfactorcombobox = formfactor 492 self.structurecombobox = structurefactor 493 self.parameters = [] 494 self.parameters = self.param_remap_from_sasmodels_convert(params) 486 if self.formfactorcombobox == 'SphericalSLDModel': 487 self.multi_factor += 1 488 self.formfactorcombobox = formfactor 489 self.structurecombobox = structurefactor 490 self.parameters = [] 491 self.parameters = self.param_remap_from_sasmodels_convert(params) 495 492 496 493 def _repr_helper(self, list, rep): … … 1016 1013 1017 1014 if node.get('version'): 1018 1015 # Get the version for model conversion purposes 1019 1016 self.version = tuple(int(e) for e in 1020 1017 str.split(node.get('version'), ".")) 1018 # The tuple must be at least 3 items long 1019 while len(self.version) < 3: 1020 ver_list = list(self.version) 1021 ver_list.append(0) 1022 self.version = tuple(ver_list) 1023 1021 1024 # Get file name 1022 1025 entry = get_content('ns:filename', node) … … 1834 1837 name = original_fname 1835 1838 state.data.group_id = name 1839 state.version = fitstate.version 1836 1840 # store state in fitting 1837 1841 self.call_back(state=state,
Note: See TracChangeset
for help on using the changeset viewer.