Return index of first added image in wxImageList::Add()

This is what MSW does. Broken in c374eefd34 (Fold wxOSX-specific wxImageList into
generic version, 2018-10-30)
See #10013
This commit is contained in:
Paul Cornett 2023-12-28 12:49:47 -08:00
parent ef326106c0
commit f1731fd672
2 changed files with 10 additions and 1 deletions

View file

@ -569,6 +569,14 @@ TEST_CASE_METHOD(ImageListTestCase,
CHECK(HasMaskOrAlpha(bmp2));
CHECK(bmp2.GetSize() == BITMAP_SIZE);
}
SECTION("Add 2x width image")
{
il.RemoveAll();
int idx = il.Add(wxBitmap(BITMAP_SIZE.x * 2, BITMAP_SIZE.y));
CHECK(idx == 0);
CHECK(il.GetImageCount() == 2);
}
}
TEST_CASE("ImageList:NegativeTests", "[imagelist][negative]")