From 6c7cf8e6d0d2a6d8e79e4d6d332157fbf03e4e37 Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Sun, 10 Apr 2022 13:32:06 +0200 Subject: [PATCH] Simplify comparing bitmap size in wxImageFileProperty Compare wxSize instead of comapring width and height separately. --- src/propgrid/advprops.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/propgrid/advprops.cpp b/src/propgrid/advprops.cpp index 994c74b338..84ad0da063 100644 --- a/src/propgrid/advprops.cpp +++ b/src/propgrid/advprops.cpp @@ -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; }