X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/25acfd4ca34c7b1beb34eca73ee33c5297f5c021..5acc0d5f32e7a9354feb6fac7a0d439fda04a370:/src/msw/bitmap.cpp diff --git a/src/msw/bitmap.cpp b/src/msw/bitmap.cpp index c4b2b8bed5..9f62b5e7c0 100644 --- a/src/msw/bitmap.cpp +++ b/src/msw/bitmap.cpp @@ -107,8 +107,6 @@ void wxBitmap::Init() { // m_refData = NULL; done in the base class ctor - if ( wxTheBitmapList ) - wxTheBitmapList->AddBitmap(this); } #ifdef __WIN32__ @@ -222,8 +220,6 @@ bool wxBitmap::CopyFromIcon(const wxIcon& icon) wxBitmap::~wxBitmap() { - if (wxTheBitmapList) - wxTheBitmapList->DeleteObject(this); } wxBitmap::wxBitmap(const char bits[], int width, int height, int depth) @@ -435,8 +431,10 @@ bool wxBitmap::CreateFromImage( const wxImage& image, int depth ) if (depth == -1) depth = wxDisplayDepth(); SetDepth( depth ); +#if wxUSE_PALETTE // Copy the palette from the source image SetPalette(image.GetPalette()); +#endif // wxUSE_PALETTE // create a DIB header int headersize = sizeof(BITMAPINFOHEADER); @@ -616,8 +614,6 @@ bool wxBitmap::CreateFromImage( const wxImage& image, int depth ) GetBitmapData()->SetOk(); #endif // WXWIN_COMPATIBILITY_2 - if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this); - return TRUE; #endif }