From e40f6b78c302d0a008c3058bf1e82017fe6cc40d Mon Sep 17 00:00:00 2001
From: Guillaume Pasero <guillaume.pasero@c-s.fr>
Date: Fri, 26 May 2017 01:36:39 +0200
Subject: [PATCH] DOC: CookBook: wrong order for type and name on choices

---
 .../Cookbook/Scripts/otbGenerateWrappersRstDoc.py         | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/Documentation/Cookbook/Scripts/otbGenerateWrappersRstDoc.py b/Documentation/Cookbook/Scripts/otbGenerateWrappersRstDoc.py
index 4c6c30fa40..f8137350ea 100755
--- a/Documentation/Cookbook/Scripts/otbGenerateWrappersRstDoc.py
+++ b/Documentation/Cookbook/Scripts/otbGenerateWrappersRstDoc.py
@@ -144,8 +144,8 @@ def FindLengthOfLargestColumnText(app,paramlist):
                 if colLength[0] < lenp:
                     colLength[0] = lenp
                 lenpdescr = len(choicename)
-                if colLength[2] < lenpdescr:
-                    colLength[2] = lenpdescr
+                if colLength[1] < lenpdescr:
+                    colLength[1] = lenpdescr
         else:
             if colLength[0] < len(param):
                 colLength[0] = len(param)
@@ -194,8 +194,8 @@ def GenerateParametersTable(app,paramlist):
         if app.GetParameterType(param) ==  otbApplication.ParameterType_Choice:
             for (choicekey,choicename) in zip(app.GetChoiceKeys(param),app.GetChoiceNames(param)):
                 output += MakeText(param + " " + choicekey, colLength[0])
-                output += MakeText(" *Choice*" ,colLength[1])
-                output += MakeText(choicename, colLength[2])
+                output += MakeText(choicename,colLength[1])
+                output += MakeText(" *Choice*", colLength[2])
                 output += '|' + linesep
                 output += RstTableHeaderLine(headerlist, colLength, '-')
     return output
-- 
GitLab