X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/87138c520ce5dc4d0268191074866e8bc300c984..2b2edbedb47a54bea26df1bede371bf761e3a233:/src/generic/imaglist.cpp diff --git a/src/generic/imaglist.cpp b/src/generic/imaglist.cpp index 0c41c5255d..e6dcbfd926 100644 --- a/src/generic/imaglist.cpp +++ b/src/generic/imaglist.cpp @@ -19,6 +19,7 @@ #endif #include "wx/generic/imaglist.h" +#include "wx/icon.h" //----------------------------------------------------------------------------- // wxImageList @@ -54,7 +55,7 @@ int wxImageList::Add( const wxBitmap &bitmap ) m_images.Append( new wxIcon( (const wxIcon&) bitmap ) ); else m_images.Append( new wxBitmap(bitmap) ); - return m_images.Number(); + return m_images.Number()-1; } const wxBitmap *wxImageList::GetBitmap( int index ) const