From d4cace1ccdeb961a0c85d808541b8b941e71bfbf Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 17 Oct 2004 01:00:31 +0000 Subject: [PATCH] use common code to determine best notebook size instaed of Mac-specific which mistakenly used current pages sizes and not the best ones git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29930 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/mac/carbon/notebook.h | 1 - src/mac/carbon/notebmac.cpp | 28 ---------------------------- 2 files changed, 29 deletions(-) diff --git a/include/wx/mac/carbon/notebook.h b/include/wx/mac/carbon/notebook.h index 63356daf75..3eb50dae82 100644 --- a/include/wx/mac/carbon/notebook.h +++ b/include/wx/mac/carbon/notebook.h @@ -133,7 +133,6 @@ public: // ------------------- virtual void Command(wxCommandEvent& event); protected: - virtual wxSize DoGetBestSize() const ; virtual wxNotebookPage *DoRemovePage(size_t page) ; virtual wxInt32 MacControlHit( WXEVENTHANDLERREF handler , WXEVENTREF event ) ; // common part of all ctors diff --git a/src/mac/carbon/notebmac.cpp b/src/mac/carbon/notebmac.cpp index db806ca7e6..fa58eacad7 100644 --- a/src/mac/carbon/notebmac.cpp +++ b/src/mac/carbon/notebmac.cpp @@ -163,34 +163,6 @@ wxSize wxNotebook::CalcSizeFromPage(const wxSize& sizePage) const return DoGetSizeFromClientSize( sizePage ) ; } -wxSize wxNotebook::DoGetBestSize() const -{ - // calculate the max page size - wxSize size(0, 0); - - size_t count = GetPageCount(); - if ( count ) - { - for ( size_t n = 0; n < count; n++ ) - { - wxSize sizePage = m_pages[n]->GetSize(); - - if ( size.x < sizePage.x ) - size.x = sizePage.x; - if ( size.y < sizePage.y ) - size.y = sizePage.y; - } - } - else // no pages - { - // use some arbitrary default size - size.x = - size.y = 100; - } - - return CalcSizeFromPage(size); -} - int wxNotebook::SetSelection(size_t nPage) { wxCHECK_MSG( IS_VALID_PAGE(nPage), -1, wxT("notebook page out of range") ); -- 2.47.2