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.
const wxPGEditor* editor = selected->GetEditorClass();
if ( editor->OnEvent( this, selected, wnd, event ) )
if ( wnd )
{
// If changes, validate them
if ( DoEditorValidate() )
// First call editor class' event handler.
const wxPGEditor* editor = selected->GetEditorClass();
if ( editor->OnEvent( this, selected, wnd, event ) )
{
if ( editor->GetValueFromControl( pendingValue, m_selected, wnd ) )
valueIsPending = true;
}
else
{
validationFailure = true;
// If changes, validate them
if ( DoEditorValidate() )
{
if ( editor->GetValueFromControl( pendingValue, m_selected, wnd ) )
valueIsPending = true;
}
else
{
validationFailure = true;
}
}
}