fixed fatal bug when moving the control after itself in tab order

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29910 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2004-10-16 01:47:22 +00:00
parent a45cd23349
commit ef6816ef25

View File

@@ -2460,6 +2460,11 @@ void wxWindowBase::DoMoveInTabOrder(wxWindow *win, MoveKind move)
wxCHECK_RET( GetParent(), wxCHECK_RET( GetParent(),
_T("MoveBefore/AfterInTabOrder() don't work for TLWs!") ); _T("MoveBefore/AfterInTabOrder() don't work for TLWs!") );
// detect the special case when we have nothing to do anyhow and when the
// code below wouldn't work
if ( win == this )
return;
// find the target window in the siblings list // find the target window in the siblings list
wxWindowList& siblings = GetParent()->GetChildren(); wxWindowList& siblings = GetParent()->GetChildren();
wxWindowList::compatibility_iterator i = siblings.Find(win); wxWindowList::compatibility_iterator i = siblings.Find(win);