diff --git a/Modules/Wrappers/QGIS/src/otbQgisDescriptor.cxx b/Modules/Wrappers/QGIS/src/otbQgisDescriptor.cxx index 2a90834577c22d11f957cce4b6b7a3711a3fe27b..da3ca1d20eb6658dc3727d487b7d4c9582e68675 100644 --- a/Modules/Wrappers/QGIS/src/otbQgisDescriptor.cxx +++ b/Modules/Wrappers/QGIS/src/otbQgisDescriptor.cxx @@ -294,11 +294,17 @@ int main(int argc, char* argv[]) std::string optional; if (param->GetMandatory()) { + // type == ParameterType_StringList check is needed because: + // + // If parameter is mandatory it can have no value + // It is accepted in OTB that, string list could be generated dynamically + // qgis has no such option to handle dynamic values yet.. + // So mandatory parameters whose type is StringList is considered optional optional = param->HasValue() || type == ParameterType_StringList ? "True" : "False"; } else { - optional = "False"; + optional = "True"; } dFile << "|" << default_value << "|" << optional; }