diff --git a/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx b/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx index dc667865571a2e12516efeafe03444bd5bd8ab52..9053fa93268a778ab585c0dc1547245c9927be1e 100644 --- a/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx +++ b/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx @@ -527,24 +527,7 @@ int Application::ExecuteAndWriteOutput() void Application::Stop() { - std::vector<std::string> paramList = GetParametersKeys(true); - for (std::vector<std::string>::const_iterator it = paramList.begin(); - it != paramList.end(); - ++it) - { - std::string key = *it; - if (GetParameterType(key) == ParameterType_OutputImage - && IsParameterEnabled(key) && HasValue(key) ) - { - Parameter* param = GetParameterByKey(key); - OutputImageParameter* outputParam = dynamic_cast<OutputImageParameter*>(param); - - if(outputParam!=ITK_NULLPTR) - { - outputParam->GetWriter()->SetAbortGenerateData(true); - } - } - } + m_ProgressSource->SetAbortGenerateData(true); } /* Enable the use of an optional parameter. Returns the previous state */