X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1d5c2a8eb521f99044a04ee5aa7be4a5619cb918..2e0ce62d46cde23d7573e6bab863fffc6f413da4:/src/univ/notebook.cpp diff --git a/src/univ/notebook.cpp b/src/univ/notebook.cpp index 17d7aefce0..c90d042c39 100644 --- a/src/univ/notebook.cpp +++ b/src/univ/notebook.cpp @@ -466,6 +466,7 @@ void wxNotebook::DoDrawTab(wxDC& dc, const wxRect& rect, size_t n) dc.SelectObject(bmp); dc.SetBackground(wxBrush(GetBackgroundColour(), wxSOLID)); m_imageList->Draw(image, dc, 0, 0, wxIMAGELIST_DRAW_NORMAL, TRUE); + dc.SelectObject(wxNullBitmap); #else bmp = *m_imageList->GetBitmap(image); #endif @@ -1253,9 +1254,14 @@ void wxNotebook::DoSetSize(int x, int y, int width, int height, int sizeFlags) { - wxControl::DoSetSize(x, y, width, height, sizeFlags); + wxSize old_client_size = GetClientSize(); - Relayout(); + wxControl::DoSetSize(x, y, width, height, sizeFlags); + + wxSize new_client_size = GetClientSize(); + + if (old_client_size != new_client_size) + Relayout(); } // ----------------------------------------------------------------------------