X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9a83f860948059b0273b5cc6d9e43fadad3ebfca..e83c4d401206ff9d5568f03ade6d9713c57bdd51:/samples/widgets/bmpcombobox.cpp diff --git a/samples/widgets/bmpcombobox.cpp b/samples/widgets/bmpcombobox.cpp index fb29fa2f5c..d65f82c259 100644 --- a/samples/widgets/bmpcombobox.cpp +++ b/samples/widgets/bmpcombobox.cpp @@ -6,7 +6,7 @@ // Created: Sep-01-2006 // Id: $Id$ // Copyright: (c) 2006 Jaakko Salli -// License: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// // ============================================================================ @@ -456,7 +456,8 @@ void BitmapComboBoxWidgetsPage::CreateCombo() for ( unsigned int n = 0; n < count; n++ ) { items.Add(m_combobox->GetString(n)); - bitmaps.Add(new wxBitmap(m_combobox->GetItemBitmap(n))); + wxBitmap bmp = m_combobox->GetItemBitmap(n); + bitmaps.Add(new wxBitmap(bmp)); } m_sizerCombo->Detach( m_combobox ); @@ -485,7 +486,7 @@ void BitmapComboBoxWidgetsPage::CreateCombo() m_sizerCombo->Add(m_combobox, 0, wxGROW | wxALL, 5); m_sizerCombo->Layout(); - // Allow changing height inorder to demonstrate flexible + // Allow changing height in order to demonstrate flexible // size of image "thumbnail" painted in the control itself. long h = 0; m_textChangeHeight->GetValue().ToLong(&h); @@ -711,10 +712,10 @@ void BitmapComboBoxWidgetsPage::LoadWidgetImages( wxArrayString* strings, wxImag #if wxUSE_IMAGE wxASSERT(fn.FileExists()); wxImage image(fn.GetFullPath()); - wxASSERT(image.Ok()); + wxASSERT(image.IsOk()); RescaleImage(image, foundSize.x, foundSize.y); wxBitmap bmp(image); - wxASSERT( bmp.Ok() ); + wxASSERT( bmp.IsOk() ); #else wxBitmap bmp(wxNullBitmap); #endif @@ -841,7 +842,7 @@ wxBitmap BitmapComboBoxWidgetsPage::LoadBitmap(const wxString& filepath) } wxImage image(filepath); - if ( image.Ok() ) + if ( image.IsOk() ) { // Rescale very large images int ow = image.GetWidth(); @@ -883,7 +884,7 @@ wxBitmap BitmapComboBoxWidgetsPage::QueryBitmap(wxString* pStr) ::wxSetCursor( *wxHOURGLASS_CURSOR ); - if ( filepath.length() ) + if ( !filepath.empty() ) { if ( pStr ) {