Applied patch [ 1777700 ] call Reparent() from wxAuiNotebook::InsertPage()

(Fixes bug [ 1769662 ] wxAuiNotebook::InsertPage() does not change page parent)

Applied patch [ 1777713 ] wxAuiNotebook::InsertPage() - properly update m_curpage
(Fixes bug [ 1769655 ] wxAuiNotebook::InsertPage() leads to inconsistent state)

From Andrey Yazhuk.



git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@48250 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2007-08-21 07:42:02 +00:00
parent 56afe8efb3
commit e4e1fe0922

View File

@@ -3072,6 +3072,8 @@ bool wxAuiNotebook::InsertPage(size_t page_idx,
bool select,
const wxBitmap& bitmap)
{
page->Reparent(this);
wxAuiNotebookPage info;
info.window = page;
info.caption = caption;
@@ -3102,6 +3104,10 @@ bool wxAuiNotebook::InsertPage(size_t page_idx,
DoSizing();
active_tabctrl->DoShowHide();
// adjust selected index
if(m_curpage >= (int) page_idx)
m_curpage++;
if (select)
{
int idx = m_tabs.GetIdxFromWindow(page);