Only reserve hotkeys for focused textCtrls that are editabled.

Otherwise just send Ctrl-C to the disabled control, and everything
else to the tool framework.

Fixes https://gitlab.com/kicad/code/kicad/issues/4801
This commit is contained in:
Jeff Young
2020-07-14 13:30:43 +01:00
parent 7f991ce855
commit e9da02e2d5
6 changed files with 35 additions and 50 deletions
+4 -4
View File
@@ -311,24 +311,24 @@ void GRID_TRICKS::doPopupSelection( wxCommandEvent& event )
void GRID_TRICKS::onKeyDown( wxKeyEvent& ev )
{
if( isCtl( 'A', ev ) )
if( ev.GetModifiers() == wxMOD_CONTROL && ev.GetKeyCode() == 'A' )
{
m_grid->SelectAll();
return;
}
else if( isCtl( 'C', ev ) )
else if( ev.GetModifiers() == wxMOD_CONTROL && ev.GetKeyCode() == 'C' )
{
getSelectedArea();
cutcopy( false );
return;
}
else if( isCtl( 'V', ev ) )
else if( ev.GetModifiers() == wxMOD_CONTROL && ev.GetKeyCode() == 'V' )
{
getSelectedArea();
paste_clipboard();
return;
}
else if( isCtl( 'X', ev ) )
else if( ev.GetModifiers() == wxMOD_CONTROL && ev.GetKeyCode() == 'X' )
{
getSelectedArea();
cutcopy( true );