]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/bmpcboxg.cpp
Fix for always failing assert in GetValue. Save the same value that
[wxWidgets.git] / src / generic / bmpcboxg.cpp
index fb993f38adbbff90c4bc3388ee0d3f5143ceb072..e74fabd3c1b95f0cd8f86eef3f919004641ec70a 100644 (file)
@@ -4,7 +4,7 @@
 // Author:      Jaakko Salli
 // Modified by:
 // Created:     Aug-31-2006
-// RCS-ID:      $Id:
+// RCS-ID:      $Id$
 // Copyright:   (c) 2005 Jaakko Salli
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -66,7 +66,7 @@ const wxChar wxBitmapComboBoxNameStr[] = wxT("bitmapComboBox");
 
 
 BEGIN_EVENT_TABLE(wxBitmapComboBox, wxOwnerDrawnComboBox)
-    EVT_SIZE(wxBitmapComboBox::OnResize)
+    EVT_SIZE(wxBitmapComboBox::OnSize)
 END_EVENT_TABLE()
 
 
@@ -264,6 +264,8 @@ int wxBitmapComboBox::DoInsertWithImage(const wxString& item,
                                         const wxBitmap& image,
                                         unsigned int pos)
 {
+    wxCHECK_MSG( IsValidInsert(pos), wxNOT_FOUND, wxT("invalid item index") );
+
     if ( !DoInsertBitmap(image, pos) )
         return wxNOT_FOUND;
 
@@ -326,7 +328,7 @@ void wxBitmapComboBox::DetermineIndent()
     SetCustomPaintWidth(indent);
 }
 
-void wxBitmapComboBox::OnResize(wxSizeEvent& event)
+void wxBitmapComboBox::OnSize(wxSizeEvent& event)
 {
     // Prevent infinite looping
     if ( !m_inResize )