diff --git a/include/wx/propgrid/propgrid.h b/include/wx/propgrid/propgrid.h index 099c987088..5c6cd03487 100644 --- a/include/wx/propgrid/propgrid.h +++ b/include/wx/propgrid/propgrid.h @@ -1408,8 +1408,6 @@ protected: wxBitmap *m_doubleBuffer; #endif - wxVector m_windowsToDelete; - /** Local time ms when control was created. */ wxLongLong m_timeCreated; diff --git a/src/propgrid/propgrid.cpp b/src/propgrid/propgrid.cpp index 56b7b8cc8a..cd549e9f04 100644 --- a/src/propgrid/propgrid.cpp +++ b/src/propgrid/propgrid.cpp @@ -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