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:
@@ -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 );
|
||||
|
@@ -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 );
|
||||
|
Reference in New Issue
Block a user