]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/notebook.cpp
What did I change here?
[wxWidgets.git] / src / univ / notebook.cpp
index 252723acd71358232492af6fbb8cace98710b220..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();
     }
@@ -1254,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();
 }
 
 // ----------------------------------------------------------------------------