diff --git a/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx b/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx index 9ad9107432f06b9331d661487360e1c6d64a74fb..5c68b10c37fd720e34060e674f9434869842e25d 100644 --- a/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx +++ b/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx @@ -340,8 +340,9 @@ void Application::UpdateParameters() InputProcessXMLParameter* inXMLParam = dynamic_cast<InputProcessXMLParameter*>(param); if(inXMLParam!=ITK_NULLPTR) { - inXMLParam->Read(this); + // switch on 'm_IsInXMLParsed' before Read() to avoid cyclic calls m_IsInXMLParsed = true; + inXMLParam->Read(this); } } } diff --git a/Modules/Wrappers/ApplicationEngine/src/otbWrapperInputProcessXMLParameter.cxx b/Modules/Wrappers/ApplicationEngine/src/otbWrapperInputProcessXMLParameter.cxx index 886261ae4f79e516b8f7213203365fa8f8a0b5e2..8bfd04bbf50c86e349b732c8ec624774a1e79551 100644 --- a/Modules/Wrappers/ApplicationEngine/src/otbWrapperInputProcessXMLParameter.cxx +++ b/Modules/Wrappers/ApplicationEngine/src/otbWrapperInputProcessXMLParameter.cxx @@ -447,6 +447,9 @@ InputProcessXMLParameter::Read(Application::Pointer this_) this_->SetParameterStringList(key, values); } + + // Call UpdateParameters after each parameter is set + this_->UpdateParameters(); } //end updateFromXML //choice also comes as setint and setstring why??