Simplify comparing bitmap size in wxImageFileProperty

Compare wxSize instead of comapring width and height separately.
This commit is contained in:
Artur Wieczorek
2022-04-10 13:32:06 +02:00
parent 9542e86770
commit 6c7cf8e6d0

View File

@@ -1882,7 +1882,7 @@ void wxImageFileProperty::OnCustomPaint( wxDC& dc,
// Create the bitmap here because required size is not known in OnSetValue().
// Delete the cache if required size changed
if ( m_bitmap.IsOk() && (m_bitmap.GetWidth() != rect.width || m_bitmap.GetHeight() != rect.height) )
if ( m_bitmap.IsOk() && (m_bitmap.GetSize() != rect.GetSize()) )
{
m_bitmap = wxNullBitmap;
}