X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/681be2ef80274e6c39b243922a594c59e4983dab..c13d6ac1ea199d1e3908d40d129e2fd5a4d82df7:/src/common/bookctrl.cpp diff --git a/src/common/bookctrl.cpp b/src/common/bookctrl.cpp index cd3baf71e6..5392388681 100644 --- a/src/common/bookctrl.cpp +++ b/src/common/bookctrl.cpp @@ -471,6 +471,19 @@ int wxBookCtrlBase::GetNextPage(bool forward) const return nPage; } +bool wxBookCtrlBase::DoSetSelectionAfterInsertion(size_t n, bool bSelect) +{ + if ( bSelect ) + SetSelection(n); + else if ( m_selection == wxNOT_FOUND ) + ChangeSelection(0); + else // We're not going to select this page. + return false; + + // Return true to indicate that we selected this page. + return true; +} + int wxBookCtrlBase::DoSetSelection(size_t n, int flags) { wxCHECK_MSG( n < GetPageCount(), wxNOT_FOUND,