Commit ecc08a14 authored by Guillaume Pasero's avatar Guillaume Pasero

BUG: compat of QgisDescriptor with old params

In remote modules for instance, old params such as EmptyParameter
or ComplexInputImageParameter are still in use. We can ensure
that QgisDescriptor support them.
parent 1d746451
......@@ -259,7 +259,8 @@ int main(int argc, char* argv[])
// setting default_value this way is an exception for ParameterType_StringList and ParameterType_String
default_value = "None|True";
}
else if (type == ParameterType_InputImage)
else if (type == ParameterType_InputImage ||
type == ParameterType_ComplexInputImage)
{
// default is None and nothing to add to dFile
}
......@@ -270,7 +271,11 @@ int main(int argc, char* argv[])
else if(type == ParameterType_Bool)
{
default_value = appli->GetParameterAsString(name);
}
}
else if(type == ParameterType_Empty)
{
default_value = appli->IsParameterEnabled(name)?"true":"false";
}
else if(type == ParameterType_Choice)
{
std::vector<std::string> key_list = appli->GetChoiceKeys(name);
......@@ -285,7 +290,8 @@ int main(int argc, char* argv[])
}
else if(type == ParameterType_OutputVectorData ||
type == ParameterType_OutputImage ||
type == ParameterType_OutputFilename)
type == ParameterType_OutputFilename ||
type == ParameterType_ComplexOutputImage)
{
// No need for default_value, optional and extra fields in dFile.
// If parameter is a destination type. qgis_type|name|description is enough.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment