Try to make SetupChildEventHandling() more foolproof

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55984 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Jaakko Salli
2008-09-30 16:33:43 +00:00
parent 9932114546
commit 28fb19ef29
2 changed files with 6 additions and 4 deletions

View File

@@ -3403,8 +3403,10 @@ void wxPropertyGrid::CustomSetCursor( int type, bool override )
// -----------------------------------------------------------------------
// Setups event handling for child control
void wxPropertyGrid::SetupChildEventHandling( wxWindow* argWnd, int id )
void wxPropertyGrid::SetupChildEventHandling( wxWindow* argWnd )
{
wxWindowID id = argWnd->GetId();
if ( argWnd == m_wndEditor )
{
this->Connect(id, wxEVT_MOTION,
@@ -3685,7 +3687,7 @@ bool wxPropertyGrid::DoSelectProperty( wxPGProperty* p, unsigned int flags )
#endif
wxWindow* primaryCtrl = GetEditorControl();
SetupChildEventHandling(primaryCtrl, wxPG_SUBID1);
SetupChildEventHandling(primaryCtrl);
// Focus and select all (wxTextCtrl, wxComboBox etc)
if ( flags & wxPG_SEL_FOCUS )
@@ -3725,7 +3727,7 @@ bool wxPropertyGrid::DoSelectProperty( wxPGProperty* p, unsigned int flags )
#endif
m_wndEditor2->Show();
SetupChildEventHandling(m_wndEditor2,wxPG_SUBID2);
SetupChildEventHandling(m_wndEditor2);
// If no primary editor, focus to button to allow
// it to interprete ENTER etc.