diff --git a/client/CPlayerInterface.cpp b/client/CPlayerInterface.cpp index 6e8ebdd7e..f114535e5 100644 --- a/client/CPlayerInterface.cpp +++ b/client/CPlayerInterface.cpp @@ -1053,11 +1053,17 @@ void CPlayerInterface::showInfoDialog(EInfoWindowMode type, const std::string &t { return; } - std::vector> intComps; - for (auto & component : components) - intComps.push_back(std::make_shared(component)); - showInfoDialog(text,intComps,soundID); - + std::vector vect = components; //I do not know currently how to avoid copy here + do + { + std::vector sender = {vect.begin(), vect.begin() + std::min(vect.size(), static_cast(8))}; + std::vector> intComps; + for (auto & component : sender) + intComps.push_back(std::make_shared(component)); + showInfoDialog(text,intComps,soundID); + vect.erase(vect.begin(), vect.begin() + std::min(vect.size(), static_cast(8))); + } + while(!vect.empty()); } void CPlayerInterface::showInfoDialog(const std::string & text, std::shared_ptr component)