Changeset 33dc18f in sasview
- Timestamp:
- Sep 14, 2017 9:33:49 AM (7 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, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 252d959
- Parents:
- 908f090
- Location:
- src/sas/sasgui/perspectives/fitting
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/fitting/basepage.py
r914c49d5 r33dc18f 1841 1841 if models.name != "NoStructure": 1842 1842 mlist.append((models.name, models)) 1843 1844 1843 # Sort the models 1845 1844 mlist_sorted = sorted(mlist) -
src/sas/sasgui/perspectives/fitting/fitting.py
r2d9526d r33dc18f 357 357 else: 358 358 page.formfactorbox.SetLabel(current_val) 359 if hasattr(page, 'structurebox'): 360 page.structurebox.Clear() 361 page._populate_box(page.structurebox, 362 page.model_list_box["Structure Factors"]) 359 363 except: 360 364 logger.error("update_custom_combo: %s", sys.exc_value) -
src/sas/sasgui/perspectives/fitting/models.py
r908f090 r33dc18f 14 14 import py_compile 15 15 import shutil 16 from copy import copy 16 17 # Explicitly import from the pluginmodel module so that py2exe 17 18 # places it in the distribution. The Model1DPlugin class is used … … 347 348 """ 348 349 self.plugins = [] 349 new_plugins = _find_models() 350 stored_names = self.stored_plugins.keys() 350 self.stored_plugins = _find_models() 351 351 structure_names = [model.name for model in self.struct_list] 352 352 form_names = [model.name for model in self.multiplication_factor] 353 for name, plug in new_plugins.iteritems(): 354 if name in stored_names: 355 # Delete references to the olf model 356 del self.stored_plugins[name] 357 del self.model_dictionary[name] 353 354 # Remove all plugin structure factors and form factors 355 for name in copy(structure_names): 356 if '[plug-in]' in name: 357 i = structure_names.index(name) 358 del self.struct_list[i] 359 structure_names.remove(name) 360 for name in copy(form_names): 361 if '[plug-in]' in name: 362 i = form_names.index(name) 363 del self.multiplication_factor[i] 364 form_names.remove(name) 365 366 # Add new plugin structure factors and form factors 367 for name, plug in self.stored_plugins.iteritems(): 358 368 if plug.is_structure_factor: 359 369 if name in structure_names: … … 379 389 380 390 self.model_combobox.reset_list("Plugin Models", self.plugins) 381 # TODO: Also update structure factor box (if it exists) 391 self.model_combobox.reset_list("Structure Factors", self.struct_list) 392 self.model_combobox.reset_list("P(Q)*S(Q)", self.multiplication_factor) 393 382 394 return self.model_combobox.get_list() 383 395
Note: See TracChangeset
for help on using the changeset viewer.