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
This commit is contained in:
Jaakko Salli
2008-09-25 15:59:49 +00:00
parent aadca0d5ac
commit 7de050ad3f

View File

@@ -3279,22 +3279,25 @@ void wxPropertyGrid::OnCustomEditorEvent( wxCommandEvent &event )
} }
} }
if ( wnd && !buttonWasHandled ) if ( !buttonWasHandled )
{ {
// First call editor class' event handler. if ( wnd )
const wxPGEditor* editor = selected->GetEditorClass();
if ( editor->OnEvent( this, selected, wnd, event ) )
{ {
// If changes, validate them // First call editor class' event handler.
if ( DoEditorValidate() ) const wxPGEditor* editor = selected->GetEditorClass();
if ( editor->OnEvent( this, selected, wnd, event ) )
{ {
if ( editor->GetValueFromControl( pendingValue, m_selected, wnd ) ) // If changes, validate them
valueIsPending = true; if ( DoEditorValidate() )
} {
else if ( editor->GetValueFromControl( pendingValue, m_selected, wnd ) )
{ valueIsPending = true;
validationFailure = true; }
else
{
validationFailure = true;
}
} }
} }