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

@@ -1803,7 +1803,7 @@ protected:
int CacheColour( const wxColour& colour ); int CacheColour( const wxColour& colour );
// Sets up basic event handling for child control // Sets up basic event handling for child control
void SetupChildEventHandling( wxWindow* wnd, int id ); void SetupChildEventHandling( wxWindow* wnd );
void CustomSetCursor( int type, bool override = false ); void CustomSetCursor( int type, bool override = false );

View File

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