Commit d92422af authored by Guillaume Pasero's avatar Guillaume Pasero
Browse files

Merge branch 'compat_qgis_descriptor' into 'develop'

BUG: compat of QgisDescriptor with old params

See merge request !305
parents 1d746451 ecc08a14
...@@ -259,7 +259,8 @@ int main(int argc, char* argv[]) ...@@ -259,7 +259,8 @@ int main(int argc, char* argv[])
// setting default_value this way is an exception for ParameterType_StringList and ParameterType_String // setting default_value this way is an exception for ParameterType_StringList and ParameterType_String
default_value = "None|True"; 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 // default is None and nothing to add to dFile
} }
...@@ -270,7 +271,11 @@ int main(int argc, char* argv[]) ...@@ -270,7 +271,11 @@ int main(int argc, char* argv[])
else if(type == ParameterType_Bool) else if(type == ParameterType_Bool)
{ {
default_value = appli->GetParameterAsString(name); default_value = appli->GetParameterAsString(name);
} }
else if(type == ParameterType_Empty)
{
default_value = appli->IsParameterEnabled(name)?"true":"false";
}
else if(type == ParameterType_Choice) else if(type == ParameterType_Choice)
{ {
std::vector<std::string> key_list = appli->GetChoiceKeys(name); std::vector<std::string> key_list = appli->GetChoiceKeys(name);
...@@ -285,7 +290,8 @@ int main(int argc, char* argv[]) ...@@ -285,7 +290,8 @@ int main(int argc, char* argv[])
} }
else if(type == ParameterType_OutputVectorData || else if(type == ParameterType_OutputVectorData ||
type == ParameterType_OutputImage || type == ParameterType_OutputImage ||
type == ParameterType_OutputFilename) type == ParameterType_OutputFilename ||
type == ParameterType_ComplexOutputImage)
{ {
// No need for default_value, optional and extra fields in dFile. // No need for default_value, optional and extra fields in dFile.
// If parameter is a destination type. qgis_type|name|description is enough. // 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