From 7de050ad3ffd48483ce1666af2925232f237c101 Mon Sep 17 00:00:00 2001 From: Jaakko Salli Date: Thu, 25 Sep 2008 15:59:49 +0000 Subject: [PATCH] Fixed bug: wxPGProperty::OnEvent() was never called if primary editor window was NULL (as could be if limited editing was used) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55866 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/propgrid/propgrid.cpp | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/src/propgrid/propgrid.cpp b/src/propgrid/propgrid.cpp index 41b0144131..9ecf73f6b1 100644 --- a/src/propgrid/propgrid.cpp +++ b/src/propgrid/propgrid.cpp @@ -3279,22 +3279,25 @@ void wxPropertyGrid::OnCustomEditorEvent( wxCommandEvent &event ) } } - if ( wnd && !buttonWasHandled ) + if ( !buttonWasHandled ) { - // First call editor class' event handler. - const wxPGEditor* editor = selected->GetEditorClass(); - - if ( editor->OnEvent( this, selected, wnd, event ) ) + if ( wnd ) { - // If changes, validate them - if ( DoEditorValidate() ) - { - if ( editor->GetValueFromControl( pendingValue, m_selected, wnd ) ) - valueIsPending = true; - } - else + // First call editor class' event handler. + const wxPGEditor* editor = selected->GetEditorClass(); + + if ( editor->OnEvent( this, selected, wnd, event ) ) { - validationFailure = true; + // If changes, validate them + if ( DoEditorValidate() ) + { + if ( editor->GetValueFromControl( pendingValue, m_selected, wnd ) ) + valueIsPending = true; + } + else + { + validationFailure = true; + } } } -- 2.47.2