Close wxDataViewCtrl inline editor when destroying the control.
If the wxDataViewCtrl control was destroyed while an inline editor control was still active, it wouldn't get destroyed in the right order and the ~wxWindow assert about unpopped event handlers would be triggered. Fix this by popping the handler as one of the first things in wxDataViewRendererBase destructor. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70002 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
eff1c3e8ec
commit
a85b4023d1
@ -672,6 +672,8 @@ wxDataViewRendererBase::wxDataViewRendererBase( const wxString &varianttype,
|
||||
|
||||
wxDataViewRendererBase::~wxDataViewRendererBase()
|
||||
{
|
||||
if ( m_editorCtrl )
|
||||
DestroyEditControl();
|
||||
}
|
||||
|
||||
wxDataViewCtrl* wxDataViewRendererBase::GetView() const
|
||||
@ -740,6 +742,8 @@ void wxDataViewRendererBase::DestroyEditControl()
|
||||
|
||||
wxPendingDelete.Append(handler);
|
||||
wxPendingDelete.Append(m_editorCtrl);
|
||||
|
||||
m_editorCtrl = NULL;
|
||||
}
|
||||
|
||||
void wxDataViewRendererBase::CancelEditing()
|
||||
|
Loading…
Reference in New Issue
Block a user