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/trunk@48249 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
18f2ae4965
commit
3d9b52a808
@ -2989,6 +2989,8 @@ bool wxAuiNotebook::InsertPage(size_t page_idx,
|
||||
bool select,
|
||||
const wxBitmap& bitmap)
|
||||
{
|
||||
page->Reparent(this);
|
||||
|
||||
wxAuiNotebookPage info;
|
||||
info.window = page;
|
||||
info.caption = caption;
|
||||
@ -3019,6 +3021,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)
|
||||
{
|
||||
SetSelectionToWindow(page);
|
||||
|
Loading…
Reference in New Issue
Block a user