Add conversion ctor from wxIcon to wxBitmapBundle too
Existing code may call functions taking wxBitmap with wxIcon, due to an existing conversion from wxIcon to wxBitmap, so we need to provide a similar conversion to wxBitmapBundle for compatibility.
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
#endif // WX_PRECOMP
|
||||
|
||||
#include "wx/bmpbndl.h"
|
||||
#include "wx/icon.h"
|
||||
|
||||
#include "wx/private/bmpbndl.h"
|
||||
|
||||
@@ -257,6 +258,11 @@ wxBitmapBundle::wxBitmapBundle(const wxBitmap& bitmap)
|
||||
{
|
||||
}
|
||||
|
||||
wxBitmapBundle::wxBitmapBundle(const wxIcon& icon)
|
||||
: m_impl(icon.IsOk() ? new wxBitmapBundleImplSet(wxBitmap(icon)) : NULL)
|
||||
{
|
||||
}
|
||||
|
||||
wxBitmapBundle::wxBitmapBundle(const wxImage& image)
|
||||
: m_impl(image.IsOk() ? new wxBitmapBundleImplSet(wxBitmap(image)) : NULL)
|
||||
{
|
||||
|
Reference in New Issue
Block a user