]> git.saurik.com Git - wxWidgets.git/commitdiff
Use wxPendingDelete
authorJaakko Salli <jaakko.salli@dnainternet.net>
Wed, 1 Oct 2008 17:43:06 +0000 (17:43 +0000)
committerJaakko Salli <jaakko.salli@dnainternet.net>
Wed, 1 Oct 2008 17:43:06 +0000 (17:43 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56021 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/propgrid/propgrid.h
src/propgrid/propgrid.cpp

index 099c98708861a7b72182dad166565b5398151361..5c6cd034870292f2675a18f5534c275a18a97f12 100644 (file)
@@ -1408,8 +1408,6 @@ protected:
     wxBitmap            *m_doubleBuffer;
 #endif
 
     wxBitmap            *m_doubleBuffer;
 #endif
 
-    wxVector<wxWindow*> m_windowsToDelete;
-
     /** Local time ms when control was created. */
     wxLongLong          m_timeCreated;
 
     /** Local time ms when control was created. */
     wxLongLong          m_timeCreated;
 
index 56b7b8cc8a82db03a4e7f74e7e2587a93beeb1e0..cd549e9f0469c62225e53ee0521c695a2c2efc9f 100644 (file)
@@ -3455,15 +3455,15 @@ void wxPropertyGrid::FreeEditors()
     // Do not free editors immediately if processing events
     if ( m_wndEditor2 )
     {
     // Do not free editors immediately if processing events
     if ( m_wndEditor2 )
     {
-        m_windowsToDelete.push_back(m_wndEditor2);
         m_wndEditor2->Hide();
         m_wndEditor2->Hide();
+        wxPendingDelete.Append( m_wndEditor2 );
         m_wndEditor2 = (wxWindow*) NULL;
     }
 
     if ( m_wndEditor )
     {
         m_wndEditor2 = (wxWindow*) NULL;
     }
 
     if ( m_wndEditor )
     {
-        m_windowsToDelete.push_back(m_wndEditor);
         m_wndEditor->Hide();
         m_wndEditor->Hide();
+        wxPendingDelete.Append( m_wndEditor );
         m_wndEditor = (wxWindow*) NULL;
     }
 }
         m_wndEditor = (wxWindow*) NULL;
     }
 }
@@ -3488,18 +3488,6 @@ bool wxPropertyGrid::DoSelectProperty( wxPGProperty* p, unsigned int flags )
 
     wxPGProperty* prev = m_selected;
 
 
     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;
     if ( !m_pState )
     {
         m_inDoSelectProperty = 0;