]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/notebook.cpp
What did I change here?
[wxWidgets.git] / src / univ / notebook.cpp
index 17d7aefce06f4d25612faa6b2e0cd808731ad451..d3d4b29fe1b982e757a0f35b69aa6662747fc783 100644 (file)
@@ -382,7 +382,11 @@ wxNotebookPage *wxNotebook::DoRemovePage(int nPage)
     m_images.RemoveAt(nPage);
 
     // the spin button might not be needed any more
-    if ( HasSpinBtn() )
+    // 2002-08-12 'if' commented out by JACS on behalf
+    // of Hans Van Leemputten <Hansvl@softhome.net> who
+    // points out that UpdateSpinBtn should always be called,
+    // to ensure m_lastVisible is up to date.
+    // if ( HasSpinBtn() )
     {
         UpdateSpinBtn();
     }
@@ -466,6 +470,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 +1258,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();
 }
 
 // ----------------------------------------------------------------------------