Skip to content
Snippets Groups Projects
Commit f251dee3 authored by Rashad Kanavath's avatar Rashad Kanavath
Browse files

BUG: param is optional if mandatory flag is off

parent f7e6bfed
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment