Skip to content

Commit

Permalink
Assign a unique ID to string pictures
Browse files Browse the repository at this point in the history
Fix #3287
  • Loading branch information
Ghabry committed Nov 8, 2024
1 parent bd8eec6 commit f01f652
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/game_pictures.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,10 @@ void Game_Pictures::Picture::AttachWindow(const Window_Base& window) {

CreateSprite();

sprite->SetBitmap(std::make_shared<Bitmap>(window.GetWidth(), window.GetHeight(), data.use_transparent_color));
auto bmp = std::make_shared<Bitmap>(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);

Expand Down

0 comments on commit f01f652

Please sign in to comment.