Cured last focus bug (I hope); some wxMotif mods

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1724 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
1999-02-18 21:24:11 +00:00
parent dd0e574a0e
commit 0492c5a094
12 changed files with 72 additions and 59 deletions

View File

@@ -42,7 +42,7 @@ END_EVENT_TABLE()
wxPanel::wxPanel()
{
m_lastFocus = NULL;
m_lastFocus = 0;
}
bool wxPanel::Create(wxWindow *parent, wxWindowID id,
@@ -145,8 +145,12 @@ void wxPanel::OnNavigationKey( wxNavigationKeyEvent& event )
void wxPanel::OnFocus(wxFocusEvent& event)
{
if ( m_lastFocus )
m_lastFocus->SetFocus();
if (m_lastFocus != 0)
{
wxWindow* child = FindWindow(m_lastFocus);
if (child)
child->SetFocus();
}
else
event.Skip();
}