Also remove wxImageList::Replace(wxIcon) overload from wxOSX

This one is harmless, unless Add() overload removed by the previous
commit, but still unnecessary.
This commit is contained in:
Vadim Zeitlin
2018-10-30 02:05:52 +01:00
parent 3ab2bfd62a
commit a2a3518b71
2 changed files with 0 additions and 26 deletions

View File

@@ -37,7 +37,6 @@ public:
int Add( const wxBitmap& bitmap, const wxColour& maskColour );
wxBitmap GetBitmap(int index) const;
wxIcon GetIcon(int index) const;
bool Replace( int index, const wxIcon &bitmap );
bool Replace( int index, const wxBitmap &bitmap );
bool Replace( int index, const wxBitmap &bitmap, const wxBitmap &mask );
bool Remove( int index );

View File

@@ -165,31 +165,6 @@ bool wxImageList::Replace( int index, const wxBitmap &bitmap )
return true;
}
bool wxImageList::Replace( int index, const wxIcon &bitmap )
{
wxList::compatibility_iterator node = m_images.Item( index );
wxCHECK_MSG( node, false, wxT("wrong index in image list") );
wxIcon* newBitmap = new wxIcon( bitmap );
if (index == (int) m_images.GetCount() - 1)
{
delete node->GetData();
m_images.Erase( node );
m_images.Append( newBitmap );
}
else
{
wxList::compatibility_iterator next = node->GetNext();
delete node->GetData();
m_images.Erase( node );
m_images.Insert( next, newBitmap );
}
return true;
}
bool wxImageList::Replace( int index, const wxBitmap &bitmap, const wxBitmap &mask )
{
wxList::compatibility_iterator node = m_images.Item( index );