]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/notebook.cpp
refresh and flicker even more to ensure proper refresh in the resizeable dialogs
[wxWidgets.git] / src / univ / notebook.cpp
index 17d7aefce06f4d25612faa6b2e0cd808731ad451..c90d042c3972158c88c8ae86860fdef175c5c3e5 100644 (file)
@@ -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();
 }
 
 // ----------------------------------------------------------------------------