From af2febcd86eb3c4e29e24303be186fd9176e1d1b Mon Sep 17 00:00:00 2001 From: Otmane Lahlou <otmane.lahlou@c-s.fr> Date: Tue, 25 Oct 2011 17:24:23 +0200 Subject: [PATCH] ENH: if a mandatory parameter belongs to a ParameterGroup (which is non mandatory) and the group is deactivated, it must not be considered as missing --- Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.cxx b/Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.cxx index b443b8e24d..128edc5ec5 100644 --- a/Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.cxx +++ b/Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.cxx @@ -326,7 +326,7 @@ CommandLineLauncher::LoadParameters() const bool paramExists( m_Parser->IsAttributExists( std::string("--").append(paramKey), m_Expression ) ); const bool hasValue = m_Application->HasValue( paramKey ); // Check if mandatory parameter are present and have value - if( param->GetMandatory() == true ) + if( param->GetMandatory() == true && param->GetRoot()->GetActive()) { if( !paramExists ) { -- GitLab