wxUiEditor icon indicating copy to clipboard operation
wxUiEditor copied to clipboard

Bug: Problem when adding last bitmap of a bundle as a standalone bitmap

Open KeyWorksRW opened this issue 1 year ago • 1 comments

Description:

There seems to be a problem when an image bundle is created with multiple images and then an additional image is created with just the last largest image in that bundle. E.g., in the current quick test in wxUiTesting, creating a wxPython_2x.png in TestDialog causes the SubDir dialog to fail because

bitmaps.push_back(wxue_img::bundle_wxPython_2x_png());

is called instead of the expected

wxueImage(wxue_img::wxPython_2x_png, sizeof(wxue_img::wxPython_2x_png))

KeyWorksRW avatar Mar 12 '24 13:03 KeyWorksRW

I suspect what is happening is that gen_Images isn't looking to see if a member of a bundle has already been added -- so it's likely that it's being added twice. Additionally, once it gets added a second time, then code to load the bundle is being used to load the image instead of calling the wxImage function.

All of these problems should get fixed as part of the #1433 overhaul.

Randalphwa avatar Mar 12 '24 14:03 Randalphwa