X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/906c935a80b10d53cecf57f71ab5f3f4f1d529ec..a69b365fbbd7fe05b78187f4d8336dcaaf4c7485:/src/osx/notebook_osx.cpp diff --git a/src/osx/notebook_osx.cpp b/src/osx/notebook_osx.cpp index 0f0ea5f37b..1c6e314ca8 100644 --- a/src/osx/notebook_osx.cpp +++ b/src/osx/notebook_osx.cpp @@ -145,7 +145,7 @@ bool wxNotebook::SetPageImage(size_t nPage, int nImage) { wxCHECK_MSG( IS_VALID_PAGE(nPage), false, wxT("SetPageImage: invalid notebook page") ); - wxCHECK_MSG( m_imageList && nImage < m_imageList->GetImageCount(), false, + wxCHECK_MSG( HasImageList() && nImage < GetImageList()->GetImageCount(), false, wxT("SetPageImage: invalid image index") ); if ( nImage != m_images[nPage] ) @@ -342,6 +342,7 @@ void wxNotebook::OnSize(wxSizeEvent& event) pPage->SetSize(rect, wxSIZE_FORCE_EVENT); } +#if 0 // deactivate r65078 for the moment // If the selected page is hidden at this point, the notebook // has become visible for the first time after creation, and // we postponed showing the page in ChangePage(). @@ -355,6 +356,7 @@ void wxNotebook::OnSize(wxSizeEvent& event) pPage->SetFocus(); } } +#endif // Processing continues to next OnSize event.Skip(); @@ -480,6 +482,7 @@ void wxNotebook::ChangePage(int nOldSel, int nSel) if ( nSel != wxNOT_FOUND ) { wxNotebookPage *pPage = m_pages[nSel]; +#if 0 // deactivate r65078 for the moment if ( IsShownOnScreen() ) { pPage->Show( true ); @@ -494,6 +497,10 @@ void wxNotebook::ChangePage(int nOldSel, int nSel) // We Show() the selected page in our OnSize handler, // unless it already is shown. } +#else + pPage->Show( true ); + pPage->SetFocus(); +#endif } m_selection = nSel; @@ -520,6 +527,8 @@ bool wxNotebook::OSXHandleClicked( double WXUNUSED(timestampsec) ) newSel, m_selection ); event.SetEventObject( this ); HandleWindowEvent( event ); + + m_selection = newSel; } else {