"selection changed" events are not generated any more when notebook
changes size git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1545 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
fff86b2918
commit
4fa688d8bc
@ -364,11 +364,13 @@ bool wxNotebook::InsertPage(int nPage,
|
||||
|
||||
void wxNotebook::OnSize(wxSizeEvent& event)
|
||||
{
|
||||
// emulate page change (it's esp. important to do it first time because
|
||||
// otherwise our page would stay invisible)
|
||||
int nSel = m_nSelection;
|
||||
m_nSelection = -1;
|
||||
SetSelection(nSel);
|
||||
// make sure the current page is shown and has focus (it's useful because all
|
||||
// pages are created invisible initially)
|
||||
if ( m_nSelection != -1 ) {
|
||||
wxNotebookPage *pPage = m_aPages[m_nSelection];
|
||||
pPage->Show(TRUE);
|
||||
pPage->SetFocus();
|
||||
}
|
||||
|
||||
// fit the notebook page to the tab control's display area
|
||||
RECT rc;
|
||||
|
Loading…
Reference in New Issue
Block a user