Skip to content

Commit 1cd0c43

Browse files
committedSep 24, 2014
[processing] fixed how models read help info
1 parent 5b82d41 commit 1cd0c43

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed
 

‎python/plugins/processing/gui/Help2Html.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,12 @@ def getHtmlFromHelpFile(alg, helpFile):
6060
try:
6161
with open(helpFile) as f:
6262
descriptions = json.load(f)
63+
return getHtmlFromDescriptionsDict(descriptions)
6364
except:
6465
return None
66+
67+
def getHtmlFromDescriptionsDict(alg, descriptions):
68+
6569
s = '<html><body><h2>Algorithm description</h2>\n'
6670
s += '<p>' + getDescription(ALG_DESC, descriptions) + '</p>\n'
6771
s += '<h2>Input parameters</h2>\n'

‎python/plugins/processing/modeler/ModelerAlgorithm.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
***************************************************************************
1818
"""
1919

20-
21-
2220
__author__ = 'Victor Olaya'
2321
__date__ = 'August 2012'
2422
__copyright__ = '(C) 2012, Victor Olaya'
@@ -45,8 +43,7 @@
4543
from processing.core.parameters import *
4644
from processing.tools import dataobjects
4745
from processing.core.parameters import getParameterFromString
48-
49-
46+
from processing.gui.Help2Html import getHtmlFromDescriptionsDict
5047

5148
class ModelerParameter():
5249

@@ -468,8 +465,7 @@ def updateModelerView(self):
468465

469466
def help(self):
470467
try:
471-
helpfile = self.descriptionFile + '.help'
472-
return True, getHtmlFromHelpFile(self, helpfile)
468+
return True, getHtmlFromDescriptionsDict(self, self.help())
473469
except:
474470
return False, None
475471

0 commit comments

Comments
 (0)
Please sign in to comment.