set m_isBeingDeleted to true (only) in SendDestroyEvent(); call it as early as possible during the window destruction to ensure that destroy event handlers can still access the full window object

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58246 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-01-20 18:33:33 +00:00
parent 8c2654ce3d
commit c6212a0cb7
42 changed files with 71 additions and 94 deletions

View File

@@ -52,7 +52,7 @@ wxRadioBox::wxRadioBox()
wxRadioBox::~wxRadioBox()
{
m_isBeingDeleted = true;
SendDestroyEvent();
wxRadioButton *next, *current;
@@ -411,7 +411,7 @@ void wxRadioBox::DoSetSize(int x, int y, int width, int height, int sizeFlags)
totWidth = GetColumnCount() * (maxWidth + charWidth);
wxSize sz = DoGetSizeFromClientSize( wxSize( totWidth, totHeight ) ) ;
// change the width / height only when specified
if ( width == wxDefaultCoord )
{
@@ -502,7 +502,7 @@ wxSize wxRadioBox::DoGetBestSize() const
wxSize sz = DoGetSizeFromClientSize( wxSize( totWidth, totHeight ) );
totWidth = sz.x;
totHeight = sz.y;
// optimum size is an additional 5 pt border to all sides
totWidth += 10;
totHeight += 10;