Use wxPendingDelete

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56021 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Jaakko Salli
2008-10-01 17:43:06 +00:00
parent 474b0ba488
commit fe6ee7ec10
2 changed files with 2 additions and 16 deletions

View File

@@ -3455,15 +3455,15 @@ void wxPropertyGrid::FreeEditors()
// Do not free editors immediately if processing events
if ( m_wndEditor2 )
{
m_windowsToDelete.push_back(m_wndEditor2);
m_wndEditor2->Hide();
wxPendingDelete.Append( m_wndEditor2 );
m_wndEditor2 = (wxWindow*) NULL;
}
if ( m_wndEditor )
{
m_windowsToDelete.push_back(m_wndEditor);
m_wndEditor->Hide();
wxPendingDelete.Append( m_wndEditor );
m_wndEditor = (wxWindow*) NULL;
}
}
@@ -3488,18 +3488,6 @@ bool wxPropertyGrid::DoSelectProperty( wxPGProperty* p, unsigned int flags )
wxPGProperty* prev = m_selected;
//
// Delete windows pending for deletion
if ( !m_inDoPropertyChanged && m_windowsToDelete.size() )
{
unsigned int i;
for ( i=0; i<m_windowsToDelete.size(); i++ )
delete m_windowsToDelete[i];
m_windowsToDelete.clear();
}
if ( !m_pState )
{
m_inDoSelectProperty = 0;