#include "wx/defs.h"
-#ifndef __PALMOS__
+#ifndef __WXPALMOS__
#include "wx/generic/imaglist.h"
int wxGenericImageList::Add( const wxBitmap &bitmap )
{
- wxASSERT_MSG( bitmap.GetWidth() == m_width &&
- bitmap.GetHeight() == m_height,
+ wxASSERT_MSG( (bitmap.GetWidth() == m_width && bitmap.GetHeight() == m_height)
+ || (m_width == 0 && m_height == 0),
_T("invalid bitmap size in wxImageList: this might work ")
_T("on this platform but definitely won't under Windows.") );
m_images.Append( new wxIcon( (const wxIcon&) bitmap ) );
else
m_images.Append( new wxBitmap(bitmap) );
+
+ if (m_width == 0 && m_height == 0)
+ {
+ m_width = bitmap.GetWidth();
+ m_height = bitmap.GetHeight();
+ }
+
return m_images.GetCount()-1;
}
return true;
}
-#endif // __PALMOS__
+#endif // __WXPALMOS__