Skip to content

Commit

Permalink
Do not attempt to load plugin model documentation and fall back to ba…
Browse files Browse the repository at this point in the history
…sic fitting help (for now)
  • Loading branch information
krzywon committed Oct 23, 2024
1 parent 37cf2b8 commit b546ad8
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/sas/qtgui/Perspectives/Fitting/FittingWidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -1888,10 +1888,8 @@ def onHelp(self):
"""
Show the "Fitting" section of help
"""
regen_in_progress = False
help_location = self.getHelpLocation(HELP_DIRECTORY_LOCATION)
if regen_in_progress is False:
self.parent.showHelp(help_location)
self.parent.showHelp(help_location)

def getHelpLocation(self, tree_base) -> Path:
# Actual file will depend on the current tab
Expand All @@ -1901,7 +1899,11 @@ def getHelpLocation(self, tree_base) -> Path:
match tab_id:
case 0:
# Look at the model and if set, pull out its help page
if self.kernel_module is not None and hasattr(self.kernel_module, 'name'):
# TODO: Disable plugin model documentation generation until issues can be resolved
plugin_names = [name for name, enabled in self.master_category_dict[CATEGORY_CUSTOM]]
if (self.kernel_module is not None
and hasattr(self.kernel_module, 'name')
and self.kernel_module.id not in plugin_names):
tree_location = tree_base / "user" / "models"
return tree_location / f"{self.kernel_module.id}.html"
else:
Expand Down

0 comments on commit b546ad8

Please sign in to comment.