]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/bookctrl.cpp
fixed memory leak in wxNativeFontInfo when using Pango
[wxWidgets.git] / src / common / bookctrl.cpp
index 553ee11ffd189a26b243df0ee50121313b363ecd..bf8a83343440d814fcd28e01348a0eb7a880554d 100644 (file)
@@ -46,10 +46,6 @@ void wxBookCtrl::Init()
 {
     m_imageList = NULL;
     m_ownsImageList = false;
-    // Unlike most controls, we don't want to adjust the min size
-    // when we set the font, since the page size is not related to
-    // the font size.
-    m_adjustMinSize = false;
 }
 
 bool
@@ -134,7 +130,9 @@ wxSize wxBookCtrl::DoGetBestSize() const
 
     // convert display area to window area, adding the size neccessary for the
     // tabs
-    return CalcSizeFromPage(bestSize);
+    wxSize best = CalcSizeFromPage(bestSize);
+    CacheBestSize(best);
+    return best;
 }
 
 // ----------------------------------------------------------------------------