mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-10-07 14:54:00 +08:00
Don't bother resetting wxStaticBitmap image when destroying it
This results in sending a WM_PAINT to the control parent which may be rather unexpected if it happens while it is itself being destroyed, see the fix for #25499 in the parent commit, so don't do it when Free() is called from dtor. And it is also unnecessary to do it when Free() is called from DoUpdateImage(), as it calls MSWReplaceImageHandle() with another, valid, handle right next anyhow.
This commit is contained in:
@@ -161,8 +161,6 @@ void wxStaticBitmap::Free()
|
||||
{
|
||||
m_bitmap.UnRef();
|
||||
|
||||
MSWReplaceImageHandle(0);
|
||||
|
||||
if ( m_ownsCurrentHandle )
|
||||
{
|
||||
::DeleteObject(m_currentHandle);
|
||||
|
||||
Reference in New Issue
Block a user