- Timestamp:
- Apr 10, 2017 12:14:27 PM (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, 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:
- d79feea
- Parents:
- 527a190 (diff), 05b8e01 (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:
- Jeff Krzywon <krzywon@…> (04/10/17 12:14:27)
- git-committer:
- GitHub <noreply@…> (04/10/17 12:14:27)
- Location:
- src/sas/sasgui/perspectives/fitting
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/fitting/fitpage.py
rd85f1d8a r7143065 1236 1236 wx.PostEvent(self.parent, new_event) 1237 1237 # update list of plugins if new plugin is available 1238 custom_model = CUSTOM_MODEL1239 1238 mod_cat = self.categorybox.GetStringSelection() 1240 if mod_cat == custom_model: 1239 if mod_cat == CUSTOM_MODEL: 1240 temp_id = self.model.id 1241 1241 temp = self.parent.update_model_list() 1242 for v in self.parent.model_dictionary.values(): 1243 if v.id == temp_id: 1244 self.model = v() 1245 break 1242 1246 if temp: 1243 1247 self.model_list_box = temp -
src/sas/sasgui/perspectives/fitting/models.py
r11b094f r05b8e01 18 18 from sas.sasgui.guiframe.CategoryInstaller import CategoryInstaller 19 19 from sasmodels.sasview_model import load_custom_model, load_standard_models 20 from sas.sasgui.perspectives.fitting.fitpage import CUSTOM_MODEL 20 21 21 22 … … 260 261 temp = {} 261 262 if self.is_changed(): 262 return _findModels(dir) 263 temp = _findModels(dir) 264 self.last_time_dir_modified = time.time() 265 return temp 263 266 logging.info("plugin model : %s" % str(temp)) 264 267 return temp … … 307 310 if os.path.isdir(plugin_dir): 308 311 temp = os.path.getmtime(plugin_dir) 309 if self.last_time_dir_modified !=temp:312 if self.last_time_dir_modified < temp: 310 313 is_modified = True 311 314 self.last_time_dir_modified = temp … … 318 321 new models were added else return empty dictionary 319 322 """ 323 self.plugins = [] 320 324 new_plugins = self.findModels() 321 if len(new_plugins) > 0: 322 for name, plug in new_plugins.iteritems(): 323 if name not in self.stored_plugins.keys(): 324 self.stored_plugins[name] = plug 325 self.plugins.append(plug) 326 self.model_dictionary[name] = plug 327 self.model_combobox.set_list("Plugin Models", self.plugins) 325 if new_plugins: 326 for name, plug in new_plugins.items(): 327 self.stored_plugins[name] = plug 328 self.plugins.append(plug) 329 self.model_dictionary[name] = plug 330 self.model_combobox.set_list(CUSTOM_MODEL, self.plugins) 328 331 return self.model_combobox.get_list() 329 332 else:
Note: See TracChangeset
for help on using the changeset viewer.