}
}
- 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;
+ }
}
}