PL editor: fix delete hotkey behaviour

Fixes: lp:1819419
* https://bugs.launchpad.net/kicad/+bug/1819419
This commit is contained in:
Michael Kavanagh 2019-04-25 18:49:54 +01:00 committed by jean-pierre charras
parent b6c9d4a88c
commit b3ad1dc26e
4 changed files with 6 additions and 6 deletions

View File

@ -82,7 +82,7 @@ BEGIN_EVENT_TABLE( PL_EDITOR_FRAME, EDA_DRAW_FRAME )
EVT_MENU( ID_HELP_GET_INVOLVED, EDA_DRAW_FRAME::GetKicadContribute ) EVT_MENU( ID_HELP_GET_INVOLVED, EDA_DRAW_FRAME::GetKicadContribute )
EVT_MENU( wxID_ABOUT, EDA_DRAW_FRAME::GetKicadAbout ) EVT_MENU( wxID_ABOUT, EDA_DRAW_FRAME::GetKicadAbout )
EVT_TOOL( wxID_CUT, PL_EDITOR_FRAME::Process_Special_Functions ) EVT_TOOL( wxID_DELETE, PL_EDITOR_FRAME::Process_Special_Functions )
EVT_TOOL( wxID_UNDO, PL_EDITOR_FRAME::GetLayoutFromUndoList ) EVT_TOOL( wxID_UNDO, PL_EDITOR_FRAME::GetLayoutFromUndoList )
EVT_TOOL( wxID_REDO, PL_EDITOR_FRAME::GetLayoutFromRedoList ) EVT_TOOL( wxID_REDO, PL_EDITOR_FRAME::GetLayoutFromRedoList )
EVT_TOOL( wxID_PRINT, PL_EDITOR_FRAME::ToPrinter ) EVT_TOOL( wxID_PRINT, PL_EDITOR_FRAME::ToPrinter )
@ -171,7 +171,7 @@ void PL_EDITOR_FRAME::Process_Special_Functions( wxCommandEvent& event )
case ID_POPUP_DESIGN_TREE_ITEM_DELETE: case ID_POPUP_DESIGN_TREE_ITEM_DELETE:
case ID_POPUP_ITEM_DELETE: case ID_POPUP_ITEM_DELETE:
case wxID_CUT: case wxID_DELETE:
// Delete item, and select the previous item // Delete item, and select the previous item
item = m_treePagelayout->GetPageLayoutSelectedItem(); item = m_treePagelayout->GetPageLayoutSelectedItem();

View File

@ -87,8 +87,7 @@ static EDA_HOTKEY HkMoveStartPoint( _HKI( "Move Start Point" ), HK_MOVE_START
ID_POPUP_ITEM_MOVE_START_POINT ); ID_POPUP_ITEM_MOVE_START_POINT );
static EDA_HOTKEY HkMoveEndPoint( _HKI( "Move End Point" ), HK_MOVE_END_POINT, 'E', static EDA_HOTKEY HkMoveEndPoint( _HKI( "Move End Point" ), HK_MOVE_END_POINT, 'E',
ID_POPUP_ITEM_MOVE_END_POINT ); ID_POPUP_ITEM_MOVE_END_POINT );
static EDA_HOTKEY HkDeleteItem( _HKI( "Delete Item" ), HK_DELETE_ITEM, WXK_DELETE, static EDA_HOTKEY HkDeleteItem( _HKI( "Delete Item" ), HK_DELETE_ITEM, WXK_DELETE, (int) wxID_DELETE );
ID_POPUP_ITEM_DELETE );
// Common: hotkeys_basic.h // Common: hotkeys_basic.h
static EDA_HOTKEY HkUndo( _HKI( "Undo" ), HK_UNDO, GR_KB_CTRL + 'Z', (int) wxID_UNDO ); static EDA_HOTKEY HkUndo( _HKI( "Undo" ), HK_UNDO, GR_KB_CTRL + 'Z', (int) wxID_UNDO );

View File

@ -113,7 +113,8 @@ void PL_EDITOR_FRAME::ReCreateMenuBar()
editMenu->AppendSeparator(); editMenu->AppendSeparator();
AddMenuItem( editMenu, wxID_CUT, _( "Delete" ), wxEmptyString, KiBitmap( delete_xpm ) ); msg = AddHotkeyName( _( "Delete" ), PlEditorHotkeysDescr, HK_DELETE_ITEM );
AddMenuItem( editMenu, wxID_DELETE, msg, wxEmptyString, KiBitmap( delete_xpm ) );
// View Menu: // View Menu:

View File

@ -66,7 +66,7 @@ void PL_EDITOR_FRAME::ReCreateHToolbar( void )
KiScaledSeparator( m_mainToolBar, this ); KiScaledSeparator( m_mainToolBar, this );
m_mainToolBar->AddTool( wxID_CUT, wxEmptyString, KiScaledBitmap( delete_xpm, this ), m_mainToolBar->AddTool( wxID_DELETE, wxEmptyString, KiScaledBitmap( delete_xpm, this ),
_( "Delete selected item" ) ); _( "Delete selected item" ) );
KiScaledSeparator( m_mainToolBar, this ); KiScaledSeparator( m_mainToolBar, this );