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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user