diff --git a/Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.cxx b/Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.cxx index 644ba3029203414c165beaa1c192fa3b8c4be8f8..077f542d948b0e8ce9e537b43cbffff232956e40 100644 --- a/Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.cxx +++ b/Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.cxx @@ -363,9 +363,6 @@ CommandLineLauncher::ParamResultType CommandLineLauncher::LoadParameters() const bool paramExists(m_Parser->IsAttributExists(std::string("-").append(paramKey), m_Expression)); - // Ensure that the parameter is enabled - m_Application->EnableParameter(paramKey); - // if param is a Group, dont do anything, ParamGroup dont have values if (type != ParameterType_Group) { @@ -383,6 +380,9 @@ CommandLineLauncher::ParamResultType CommandLineLauncher::LoadParameters() return INVALIDNUMBEROFVALUE; } + // Ensure that the parameter is enabled + m_Application->EnableParameter(paramKey); + if (type == ParameterType_InputVectorDataList) { dynamic_cast<InputVectorDataListParameter *> (param.GetPointer())->SetListFromFileName(values);