Changeset b4398819 in sasview for src


Ignore:
Timestamp:
Sep 9, 2018 11:35:35 AM (6 years ago)
Author:
butler
Branches:
master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, unittest-saveload
Children:
0863065
Parents:
b229a3b
Message:

Fix blank page when clicking help on a plugin model

Addresses #529. Plungin models do not have model.html help pages so
check if model is plugin. If so send to general model help. If regular
built-in model send to model.html help page. eventually need better
solution .. also for original problem with ticket which is the P*S.

File:
1 edited

Legend:

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

    r8a51dea0 rb4398819  
    28012801        Function called when 'Help' button is pressed next to model 
    28022802        of interest.  This calls DocumentationWindow from 
    2803         documentation_window.py. It will load the top level of the model 
    2804         help documenation sphinx generated html if no model is presented. 
    2805         If a model IS present then if documention for that model exists 
    2806         it will load to that  point otherwise again it will go to the top. 
    2807         For Wx2.8 and below is used (i.e. non-released through installer) 
    2808         a browser is loaded and the top of the model documentation only is 
    2809         accessible because webbrowser module does not pass anything after 
    2810         the # to the browser. 
     2803        documentation_window.py. It will load the top level of the html model 
     2804        help documenation sphinx generated if either a plugin model (which 
     2805        normally does not have an html help help file) is selected or if no 
     2806        model is selected. Otherwise, if a regula model is selected, the 
     2807        documention for that model will be sent to a browser window. 
     2808 
     2809        :todo the quick fix for no documentation in plugins is the if statment. 
     2810        However, the right way to do this would be to check whether the hmtl 
     2811        file exists and load the model docs if it does and the general docs if 
     2812        it doesn't - this will become important if we ever figure out how to 
     2813        build docs for plugins on the fly.  Sep 9, 2018 -PDB 
    28112814 
    28122815        :param event: on Help Button pressed event 
    28132816        """ 
    28142817 
    2815         if self.model is not None: 
     2818        if (self.model is not None) and (self.categorybox.GetValue() 
     2819                                         != "Plugin Models"): 
    28162820            name = self.formfactorbox.GetValue() 
    28172821            _TreeLocation = 'user/models/%s.html' % name 
Note: See TracChangeset for help on using the changeset viewer.