From f01f652e8aa02b5a27902e70bcd0d7b6c493e54d Mon Sep 17 00:00:00 2001 From: Ghabry Date: Fri, 8 Nov 2024 21:09:36 +0100 Subject: [PATCH] Assign a unique ID to string pictures Fix #3287 --- src/game_pictures.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/game_pictures.cpp b/src/game_pictures.cpp index 3fc5f26010..c2e92a2fbe 100644 --- a/src/game_pictures.cpp +++ b/src/game_pictures.cpp @@ -498,7 +498,10 @@ void Game_Pictures::Picture::AttachWindow(const Window_Base& window) { CreateSprite(); - sprite->SetBitmap(std::make_shared(window.GetWidth(), window.GetHeight(), data.use_transparent_color)); + auto bmp = std::make_shared(window.GetWidth(), window.GetHeight(), data.use_transparent_color); + bmp->SetId(fmt::format("W:{}{}{}", (void*)&window, window.GetWidth(), window.GetHeight())); + + sprite->SetBitmap(bmp); sprite->OnPictureShow(); sprite->SetVisible(true);