Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/perspectives/fitting/models.py

    re92a352 red28d8c  
    2323PLUGIN_LOG = os.path.join(os.path.expanduser("~"), '.sasview', PLUGIN_DIR, 
    2424                          "plugins.log") 
     25PLUGIN_NAME_BASE = '[plug-in] ' 
    2526 
    2627def get_model_python_path(): 
     
    181182            try: 
    182183                model = load_custom_model(path) 
    183                 model.name = "[plug-in] "+model.name 
     184                model.name = PLUGIN_NAME_BASE + model.name 
    184185                plugins[model.name] = model 
    185186            except Exception: 
     
    318319        """ 
    319320        new_plugins = self.findModels() 
    320         if len(new_plugins) > 0: 
    321             for name, plug in  new_plugins.iteritems(): 
    322                 if name not in self.stored_plugins.keys(): 
    323                     self.stored_plugins[name] = plug 
    324                     self.plugins.append(plug) 
    325                     self.model_dictionary[name] = plug 
     321        if new_plugins: 
     322            for name, plug in  new_plugins.items(): 
     323                self.stored_plugins[name] = plug 
     324                self.plugins.append(plug) 
     325                self.model_dictionary[name] = plug 
    326326            self.model_combobox.set_list("Plugin Models", self.plugins) 
    327327            return self.model_combobox.get_list() 
Note: See TracChangeset for help on using the changeset viewer.