Converted various wxArrayPtrVoids to wxVectors
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55989 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -602,8 +602,6 @@ void wxPropertyGrid::Init1()
|
||||
m_doubleBuffer = (wxBitmap*) NULL;
|
||||
#endif
|
||||
|
||||
m_windowsToDelete = NULL;
|
||||
|
||||
#ifndef wxPG_ICON_WIDTH
|
||||
m_expandbmp = NULL;
|
||||
m_collbmp = NULL;
|
||||
@@ -761,8 +759,6 @@ wxPropertyGrid::~wxPropertyGrid()
|
||||
delete m_doubleBuffer;
|
||||
#endif
|
||||
|
||||
delete m_windowsToDelete;
|
||||
|
||||
//m_selected = (wxPGProperty*) NULL;
|
||||
|
||||
if ( m_iFlags & wxPG_FL_CREATEDSTATE )
|
||||
@@ -3448,19 +3444,16 @@ void wxPropertyGrid::SetupChildEventHandling( wxWindow* argWnd )
|
||||
void wxPropertyGrid::FreeEditors()
|
||||
{
|
||||
// Do not free editors immediately if processing events
|
||||
if ( !m_windowsToDelete )
|
||||
m_windowsToDelete = new wxArrayPtrVoid;
|
||||
|
||||
if ( m_wndEditor2 )
|
||||
{
|
||||
m_windowsToDelete->push_back(m_wndEditor2);
|
||||
m_windowsToDelete.push_back(m_wndEditor2);
|
||||
m_wndEditor2->Hide();
|
||||
m_wndEditor2 = (wxWindow*) NULL;
|
||||
}
|
||||
|
||||
if ( m_wndEditor )
|
||||
{
|
||||
m_windowsToDelete->push_back(m_wndEditor);
|
||||
m_windowsToDelete.push_back(m_wndEditor);
|
||||
m_wndEditor->Hide();
|
||||
m_wndEditor = (wxWindow*) NULL;
|
||||
}
|
||||
@@ -3488,14 +3481,14 @@ bool wxPropertyGrid::DoSelectProperty( wxPGProperty* p, unsigned int flags )
|
||||
|
||||
//
|
||||
// Delete windows pending for deletion
|
||||
if ( m_windowsToDelete && !m_inDoPropertyChanged && m_windowsToDelete->size() )
|
||||
if ( !m_inDoPropertyChanged && m_windowsToDelete.size() )
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
for ( i=0; i<m_windowsToDelete->size(); i++ )
|
||||
delete ((wxWindow*)((*m_windowsToDelete)[i]));
|
||||
for ( i=0; i<m_windowsToDelete.size(); i++ )
|
||||
delete m_windowsToDelete[i];
|
||||
|
||||
m_windowsToDelete->clear();
|
||||
m_windowsToDelete.clear();
|
||||
}
|
||||
|
||||
if ( !m_pState )
|
||||
@@ -5627,11 +5620,7 @@ void wxPGChoicesData::Clear()
|
||||
delete Item(i);
|
||||
}
|
||||
|
||||
#if wxUSE_STL
|
||||
m_items.resize(0);
|
||||
#else
|
||||
m_items.Empty();
|
||||
#endif
|
||||
m_items.clear();
|
||||
}
|
||||
|
||||
void wxPGChoicesData::CopyDataFrom( wxPGChoicesData* data )
|
||||
@@ -5776,7 +5765,8 @@ void wxPGChoices::RemoveAt(size_t nIndex, size_t count)
|
||||
unsigned int i;
|
||||
for ( i=nIndex; i<(nIndex+count); i++)
|
||||
delete m_data->Item(i);
|
||||
m_data->m_items.RemoveAt(nIndex, count);
|
||||
m_data->m_items.erase(m_data->m_items.begin()+nIndex,
|
||||
m_data->m_items.begin()+nIndex+count-1);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user