]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/widgets/bmpcombobox.cpp
Fixed problems caused by duplicated names across different style types.
[wxWidgets.git] / samples / widgets / bmpcombobox.cpp
index fb29fa2f5c65e60b34ece2bda30cb4bd587f2b32..33276957fc2ffbe0f84252dd79849d93cff7dd3d 100644 (file)
@@ -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 );
@@ -883,7 +884,7 @@ wxBitmap BitmapComboBoxWidgetsPage::QueryBitmap(wxString* pStr)
 
     ::wxSetCursor( *wxHOURGLASS_CURSOR );
 
-    if ( filepath.length() )
+    if ( !filepath.empty() )
     {
         if ( pStr )
         {