Do not propagate key events from child controls unless they have modifiers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58500 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -4832,6 +4832,11 @@ void wxPropertyGrid::HandleKeyEvent( wxKeyEvent &event, bool fromChild )
|
|||||||
// Except for TAB and ESC, handle child control events in child control
|
// Except for TAB and ESC, handle child control events in child control
|
||||||
if ( fromChild )
|
if ( fromChild )
|
||||||
{
|
{
|
||||||
|
// Only propagate event if it had modifiers
|
||||||
|
if ( !event.HasModifiers() )
|
||||||
|
{
|
||||||
|
event.StopPropagation();
|
||||||
|
}
|
||||||
event.Skip();
|
event.Skip();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -4905,6 +4910,19 @@ void wxPropertyGrid::HandleKeyEvent( wxKeyEvent &event, bool fromChild )
|
|||||||
|
|
||||||
void wxPropertyGrid::OnKey( wxKeyEvent &event )
|
void wxPropertyGrid::OnKey( wxKeyEvent &event )
|
||||||
{
|
{
|
||||||
|
// If there was editor open and focused, then this event should not
|
||||||
|
// really be processed here.
|
||||||
|
if ( IsEditorFocused() )
|
||||||
|
{
|
||||||
|
// However, if event had modifiers, it is probably still best
|
||||||
|
// to skip it.
|
||||||
|
if ( event.HasModifiers() )
|
||||||
|
event.Skip();
|
||||||
|
else
|
||||||
|
event.StopPropagation();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
HandleKeyEvent(event, false);
|
HandleKeyEvent(event, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user