Skip to content
Snippets Groups Projects
Commit e40f6b78 authored by Guillaume Pasero's avatar Guillaume Pasero
Browse files

DOC: CookBook: wrong order for type and name on choices

parent 0bd223da
No related branches found
No related tags found
No related merge requests found
...@@ -144,8 +144,8 @@ def FindLengthOfLargestColumnText(app,paramlist): ...@@ -144,8 +144,8 @@ def FindLengthOfLargestColumnText(app,paramlist):
if colLength[0] < lenp: if colLength[0] < lenp:
colLength[0] = lenp colLength[0] = lenp
lenpdescr = len(choicename) lenpdescr = len(choicename)
if colLength[2] < lenpdescr: if colLength[1] < lenpdescr:
colLength[2] = lenpdescr colLength[1] = lenpdescr
else: else:
if colLength[0] < len(param): if colLength[0] < len(param):
colLength[0] = len(param) colLength[0] = len(param)
...@@ -194,8 +194,8 @@ def GenerateParametersTable(app,paramlist): ...@@ -194,8 +194,8 @@ def GenerateParametersTable(app,paramlist):
if app.GetParameterType(param) == otbApplication.ParameterType_Choice: if app.GetParameterType(param) == otbApplication.ParameterType_Choice:
for (choicekey,choicename) in zip(app.GetChoiceKeys(param),app.GetChoiceNames(param)): for (choicekey,choicename) in zip(app.GetChoiceKeys(param),app.GetChoiceNames(param)):
output += MakeText(param + " " + choicekey, colLength[0]) output += MakeText(param + " " + choicekey, colLength[0])
output += MakeText(" *Choice*" ,colLength[1]) output += MakeText(choicename,colLength[1])
output += MakeText(choicename, colLength[2]) output += MakeText(" *Choice*", colLength[2])
output += '|' + linesep output += '|' + linesep
output += RstTableHeaderLine(headerlist, colLength, '-') output += RstTableHeaderLine(headerlist, colLength, '-')
return output return output
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment