return;
}
- event.Skip();
-
// Except for TAB and ESC, handle child control events in child control
if ( fromChild )
+ {
+ event.Skip();
return;
+ }
+
+ bool wasHandled = false;
if ( m_selected )
{
if ( action == wxPG_ACTION_COLLAPSE_PROPERTY || secondAction == wxPG_ACTION_COLLAPSE_PROPERTY )
{
if ( (m_windowStyle & wxPG_HIDE_MARGIN) || Collapse(p) )
- keycode = 0;
+ wasHandled = true;
}
else if ( action == wxPG_ACTION_EXPAND_PROPERTY || secondAction == wxPG_ACTION_EXPAND_PROPERTY )
{
if ( (m_windowStyle & wxPG_HIDE_MARGIN) || Expand(p) )
- keycode = 0;
+ wasHandled = true;
}
}
- if ( keycode )
+ if ( !wasHandled )
{
if ( action == wxPG_ACTION_PREV_PROPERTY || secondAction == wxPG_ACTION_PREV_PROPERTY )
{
p = wxPropertyGridIterator::OneStep( m_pState, wxPG_ITERATE_VISIBLE, p, selectDir );
if ( p )
DoSelectProperty(p);
+ wasHandled = true;
}
}
else
{
wxPGProperty* p = wxPropertyGridInterface::GetFirst();
if ( p ) DoSelectProperty(p);
+ wasHandled = true;
}
}
+
+ if ( !wasHandled )
+ event.Skip();
}
// -----------------------------------------------------------------------