From 0f9cb0fce1d61f7aa95e9f31ff1e9b46edc75be9 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 21 Oct 2021 18:31:34 +0100 Subject: [PATCH] Refresh wxStaticBitmap and update its size in wxUniv SetBitmap() Make wxUniv behave consistently with the other ports. --- src/univ/statbmp.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/univ/statbmp.cpp b/src/univ/statbmp.cpp index dc6a590d65..a773abd383 100644 --- a/src/univ/statbmp.cpp +++ b/src/univ/statbmp.cpp @@ -67,6 +67,10 @@ bool wxStaticBitmap::Create(wxWindow *parent, void wxStaticBitmap::SetBitmap(const wxBitmap& bitmap) { m_bitmap = bitmap; + + InvalidateBestSize(); + SetSize(GetBestSize()); + Refresh(); } // ----------------------------------------------------------------------------