X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/db0aec831d38f2937e6a595d9fa40c84e6499fdd..a9249b2eb2a40d8c71f828669045c4ddaa8dc5ff:/src/gtk/bitmap.cpp?ds=inline diff --git a/src/gtk/bitmap.cpp b/src/gtk/bitmap.cpp index e104eb7e82..1f62c2a11b 100644 --- a/src/gtk/bitmap.cpp +++ b/src/gtk/bitmap.cpp @@ -255,14 +255,11 @@ IMPLEMENT_DYNAMIC_CLASS(wxBitmap,wxGDIObject) wxBitmap::wxBitmap() { - if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this); } wxBitmap::wxBitmap( int width, int height, int depth ) { Create( width, height, depth ); - - if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this); } bool wxBitmap::Create( int width, int height, int depth ) @@ -322,8 +319,6 @@ bool wxBitmap::CreateFromXpm( const char **bits ) M_BMPDATA->m_bpp = visual->depth; // ? - if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this); - return TRUE; } @@ -334,8 +329,6 @@ bool wxBitmap::CreateFromImage( const wxImage& image, int depth ) m_refData = new wxBitmapRefData(); - if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this); - // ------ // convertion to mono bitmap: // ------ @@ -774,15 +767,11 @@ wxImage wxBitmap::ConvertToImage() const wxBitmap::wxBitmap( const wxBitmap& bmp ) { Ref( bmp ); - - if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this); } wxBitmap::wxBitmap( const wxString &filename, int type ) { LoadFile( filename, type ); - - if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this); } wxBitmap::wxBitmap( const char bits[], int width, int height, int WXUNUSED(depth)) @@ -797,19 +786,17 @@ wxBitmap::wxBitmap( const char bits[], int width, int height, int WXUNUSED(depth M_BMPDATA->m_bpp = 1; wxCHECK_RET( M_BMPDATA->m_bitmap, wxT("couldn't create bitmap") ); - - if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this); } wxBitmap::~wxBitmap() { - if (wxTheBitmapList) wxTheBitmapList->DeleteObject(this); } wxBitmap& wxBitmap::operator = ( const wxBitmap& bmp ) { - if (*this == bmp) return (*this); - Ref( bmp ); + if ( m_refData != bmp.m_refData ) + Ref( bmp ); + return *this; }