Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/MainWindow/GuiManager.py

    rfa05c6c1 rc889a3e  
    6565        # Add signal callbacks 
    6666        self.addCallbacks() 
     67 
     68        # Assure model categories are available 
     69        self.addCategories() 
    6770 
    6871        # Create the data manager 
     
    142145        self.ResolutionCalculator = ResolutionCalculatorPanel(self) 
    143146        self.DataOperation = DataOperationUtilityPanel(self) 
     147 
     148    def addCategories(self): 
     149        """ 
     150        Make sure categories.json exists and if not compile it and install in ~/.sasview 
     151        """ 
     152        try: 
     153            from sas.sascalc.fit.models import ModelManager 
     154            from sas.qtgui.Utilities.CategoryInstaller import CategoryInstaller 
     155            model_list = ModelManager().cat_model_list() 
     156            CategoryInstaller.check_install(model_list=model_list) 
     157        except Exception: 
     158            logger.error("%s: could not load SasView models") 
     159            logger.error(traceback.format_exc()) 
    144160 
    145161    def statusBarSetup(self): 
Note: See TracChangeset for help on using the changeset viewer.