[ wxwindows-Bugs-1769662 ] wxAuiNotebook::InsertPage() does not
change page parent
SourceForge.net
noreply at sourceforge.net
Tue Aug 21 00:44:46 PDT 2007
Bugs item #1769662, was opened at 2007-08-07 21:14
Message generated for change (Comment added) made by juliansmart
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1769662&group_id=9863
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: AUI
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Andrey (andrey_yazhuk)
Assigned to: Benjamin I. Williams (biwillia76)
Summary: wxAuiNotebook::InsertPage() does not change page parent
Initial Comment:
If a window is not a child window of wxAuiNotebook then calling wxAuiNotebook::AddPage(window) / InsertPage(winbdow) results in inconsistent state – GetParent() for the child window will still return the old value, but the notebook will try to manage it as its own child.
Adding the following line
page->Reparent(this);
to wxAuiNotebook::InsertPage() should fix the problem.
----------------------------------------------------------------------
>Comment By: Julian Smart (juliansmart)
Date: 2007-08-21 07:44
Message:
Logged In: YES
user_id=59495
Originator: NO
Applied patch [ 1777700 ] call Reparent() from
wxAuiNotebook::InsertPage()
http://sourceforge.net/tracker/index.php?func=detail&aid=1777700&group_id=9863&atid=309863
----------------------------------------------------------------------
Comment By: Andrey (andrey_yazhuk)
Date: 2007-08-10 19:57
Message:
Logged In: YES
user_id=1817710
Originator: YES
wxWidgets 2.8.4
file \src\aui\auibook.cpp
bool wxAuiNotebook::InsertPage(size_t page_idx,
wxWindow* page,
const wxString& caption,
bool select,
const wxBitmap& bitmap)
{
page->Reparent(this); // this is the new line
----------------------------------------------------------------------
Comment By: Andrey (andrey_yazhuk)
Date: 2007-08-10 15:01
Message:
Logged In: YES
user_id=1817710
Originator: YES
I believe page->Reparent(this) should be the first line of
wxAuiNotebook::InsertPage() function.
wxAuiNotebook::AddPage() calls wxAuiNotebook::InsertPage(), so no other
changes needed.
----------------------------------------------------------------------
Comment By: Julian Smart (juliansmart)
Date: 2007-08-10 10:52
Message:
Logged In: YES
user_id=59495
Originator: NO
Can you be more specific as to where the line should go? Thanks!
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1769662&group_id=9863
More information about the wx-dev
mailing list