]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/bmpcboxg.cpp
correctly render titlebars for TLWs with wxCAPTION but without wxCLOSE_BOX
[wxWidgets.git] / src / generic / bmpcboxg.cpp
index d7af0024032027fc7aebb41d25ba896bb441f0de..3432680bd667e0013fb64884b320dca686c9777d 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
 /////////////////////////////////////////////////////////////////////////////
@@ -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;
 
@@ -317,7 +319,7 @@ void wxBitmapComboBox::DetermineIndent()
 
     if ( m_usedImgSize.x > 0 )
     {
-        indent = m_usedImgSize.y + IMAGE_SPACING_LEFT + IMAGE_SPACING_RIGHT;
+        indent = m_usedImgSize.x + IMAGE_SPACING_LEFT + IMAGE_SPACING_RIGHT;
         m_imgAreaWidth = indent;
 
         indent -= 3;