]> git.saurik.com Git - wxWidgets.git/commitdiff
apparently the check for too small rect is needed not only with wxNB_MULTILINE (see...
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 25 May 2005 23:27:34 +0000 (23:27 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 25 May 2005 23:27:34 +0000 (23:27 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34343 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/notebook.cpp

index 8fb74d7e20d8cccc86dfc1f1951fc7ce18cb5457..e6104def388e873036d826c4826d81d74a87cff9 100644 (file)
@@ -497,12 +497,12 @@ wxRect wxNotebook::GetPageSize() const
     ::GetClientRect(GetHwnd(), &rc);
 
     // This check is to work around a bug in TabCtrl_AdjustRect which will
-    // cause a crash on win2k, or on XP with themes disabled, if the
-    // wxNB_MULTILINE style is used and the rectangle is very small, (such as
-    // when the notebook is first created.)  The value of 20 is just
-    // arbitrarily chosen, if there is a better way to determine this value
-    // then please do so.  --RD
-    if ( !HasFlag(wxNB_MULTILINE) || (rc.right > 20 && rc.bottom > 20) )
+    // cause a crash on win2k or on XP with themes disabled if either
+    // wxNB_MULTILINE is used or tabs are placed on a side, if the rectangle
+    // is too small.
+    //
+    // The value of 20 is chosen arbitrarily but seems to work
+    if ( rc.right > 20 && rc.bottom > 20 )
     {
         TabCtrl_AdjustRect(GetHwnd(), false, &rc);