]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/bmpbuttn.cpp
wxRichTextCtrl::ApplyStyle now applies a paragraph style at the cursor
[wxWidgets.git] / src / msw / bmpbuttn.cpp
index a77672cbfbd45a5b16276c935ba98b8b3628cd9a..217b1aec6393490e1b79ef23a1991729d54cc579 100644 (file)
@@ -127,7 +127,7 @@ bool wxBitmapButton::Create(wxWindow *parent,
                             const wxBitmap& bitmap,
                             const wxPoint& pos,
                             const wxSize& size, long style,
                             const wxBitmap& bitmap,
                             const wxPoint& pos,
                             const wxSize& size, long style,
-                            const wxValidator& wxVALIDATOR_PARAM(validator),
+                            const wxValidator& validator,
                             const wxString& name)
 {
     if ( !wxBitmapButtonBase::Create(parent, id, pos, size, style,
                             const wxString& name)
 {
     if ( !wxBitmapButtonBase::Create(parent, id, pos, size, style,
@@ -136,6 +136,13 @@ bool wxBitmapButton::Create(wxWindow *parent,
 
     SetBitmapLabel(bitmap);
 
 
     SetBitmapLabel(bitmap);
 
+    if ( !size.IsFullySpecified() )
+    {
+        // As our bitmap has just changed, our best size has changed as well so
+        // reset the initial size using the new value.
+        SetInitialSize(size);
+    }
+
     return true;
 }
 
     return true;
 }