Skip to content

Commit

Permalink
[processing] fixed how models read help info
Browse files Browse the repository at this point in the history
  • Loading branch information
volaya committed Sep 24, 2014
1 parent 5b82d41 commit 1cd0c43
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 4 additions & 0 deletions python/plugins/processing/gui/Help2Html.py
Expand Up @@ -60,8 +60,12 @@ def getHtmlFromHelpFile(alg, helpFile):
try:
with open(helpFile) as f:
descriptions = json.load(f)
return getHtmlFromDescriptionsDict(descriptions)
except:
return None

def getHtmlFromDescriptionsDict(alg, descriptions):

s = '<html><body><h2>Algorithm description</h2>\n'
s += '<p>' + getDescription(ALG_DESC, descriptions) + '</p>\n'
s += '<h2>Input parameters</h2>\n'
Expand Down
8 changes: 2 additions & 6 deletions python/plugins/processing/modeler/ModelerAlgorithm.py
Expand Up @@ -17,8 +17,6 @@
***************************************************************************
"""



__author__ = 'Victor Olaya'
__date__ = 'August 2012'
__copyright__ = '(C) 2012, Victor Olaya'
Expand All @@ -45,8 +43,7 @@
from processing.core.parameters import *
from processing.tools import dataobjects
from processing.core.parameters import getParameterFromString


from processing.gui.Help2Html import getHtmlFromDescriptionsDict

class ModelerParameter():

Expand Down Expand Up @@ -468,8 +465,7 @@ def updateModelerView(self):

def help(self):
try:
helpfile = self.descriptionFile + '.help'
return True, getHtmlFromHelpFile(self, helpfile)
return True, getHtmlFromDescriptionsDict(self, self.help())
except:
return False, None

Expand Down

0 comments on commit 1cd0c43

Please sign in to comment.