Changeset ce0a245 in sasview for src/sas/sasgui/perspectives/fitting/models.py
- Timestamp:
- Sep 20, 2017 12:13:53 PM (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:
- d76c43a, fca1f50
- Parents:
- 2a399ca (diff), 13374be (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - git-author:
- Paul Kienzle <pkienzle@…> (09/20/17 12:13:53)
- git-committer:
- GitHub <noreply@…> (09/20/17 12:13:53)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/fitting/models.py
r632fda9 r13374be 21 21 from sas.sasgui.guiframe.CategoryInstaller import CategoryInstaller 22 22 from sasmodels.sasview_model import load_custom_model, load_standard_models 23 from sas.sasgui.perspectives.fitting.fitpage import CUSTOM_MODEL 23 24 24 25 logger = logging.getLogger(__name__) … … 266 267 temp = {} 267 268 if self.is_changed(): 268 return _find_models() 269 temp = _find_models() 270 self.last_time_dir_modified = time.time() 271 return temp 269 272 logger.info("plugin model : %s" % str(temp)) 270 273 return temp … … 323 326 if os.path.isdir(plugin_dir): 324 327 temp = os.path.getmtime(plugin_dir) 325 if self.last_time_dir_modified !=temp:328 if self.last_time_dir_modified < temp: 326 329 is_modified = True 327 330 self.last_time_dir_modified = temp … … 334 337 new models were added else return empty dictionary 335 338 """ 339 self.plugins = [] 336 340 new_plugins = self.findModels() 337 if len(new_plugins) > 0: 338 for name, plug in new_plugins.iteritems(): 339 if name not in self.stored_plugins.keys(): 340 self.stored_plugins[name] = plug 341 self.plugins.append(plug) 342 self.model_dictionary[name] = plug 343 self.model_combobox.set_list("Plugin Models", self.plugins) 341 if new_plugins: 342 for name, plug in new_plugins.items(): 343 self.stored_plugins[name] = plug 344 self.plugins.append(plug) 345 self.model_dictionary[name] = plug 346 self.model_combobox.set_list(CUSTOM_MODEL, self.plugins) 344 347 return self.model_combobox.get_list() 345 348 else:
Note: See TracChangeset
for help on using the changeset viewer.