Fix confusion between width and height in wxArtProvider

Amazingly, the fact that the bitmap height was compared with the
required width went unnoticed even though it was there since this code
was added back in e53a95bcb1 (Applied patch for ArtProvider.,
2005-03-12) and even survived migration to a different file in
2b7e668221 (Move bitmap resizing from wxDefaultArtProvider to base
class, 2022-02-05).

That this has never been a problem seems to conclusively prove that
non-square icons simply don't exist, but still fix the comparisons just
to be tidy.
This commit is contained in:
Vadim Zeitlin
2022-06-02 22:58:57 +01:00
parent 451e482d99
commit 512d20c554

View File

@@ -309,7 +309,7 @@ wxArtProvider::RescaleOrResizeIfNeeded(wxBitmap& bmp, const wxSize& sizeNeeded)
return;
#if wxUSE_IMAGE
if ((bmp_h <= sizeNeeded.x) && (bmp_w <= sizeNeeded.y))
if ((bmp_w <= sizeNeeded.x) && (bmp_h <= sizeNeeded.y))
{
// the caller wants default size, which is larger than
// the image we have; to avoid degrading it visually by