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:
@@ -35,7 +35,6 @@ public:
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxControlNameStr);
|
||||
|
||||
virtual ~wxControl();
|
||||
|
||||
// Simulates an event
|
||||
virtual void Command(wxCommandEvent& event) { ProcessCommand(event); }
|
||||
|
@@ -32,7 +32,6 @@ public:
|
||||
{
|
||||
Create( pParent, vId, rPos, rSize, lStyle, rValidator, rsName );
|
||||
}
|
||||
virtual ~wxControl();
|
||||
|
||||
bool Create( wxWindow* pParent
|
||||
,wxWindowID vId
|
||||
|
@@ -35,7 +35,6 @@ public:
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxControlNameStr);
|
||||
virtual ~wxControl();
|
||||
|
||||
// Simulates an event
|
||||
virtual void Command(wxCommandEvent& event) { ProcessCommand(event); }
|
||||
|
@@ -1402,7 +1402,8 @@ protected:
|
||||
void SatisfyConstraints();
|
||||
#endif // wxUSE_CONSTRAINTS
|
||||
|
||||
// Send the wxWindowDestroyEvent
|
||||
// Send the wxWindowDestroyEvent if not done yet and sets m_isBeingDeleted
|
||||
// to true
|
||||
void SendDestroyEvent();
|
||||
|
||||
// returns the main window of composite control; this is the window
|
||||
|
Reference in New Issue
Block a user