PL editor: fix delete hotkey behaviour
Also fix assert related to zoom to selection menubar item (missing wxITEM_CHECK). Fixes: lp:1819419 * https://bugs.launchpad.net/kicad/+bug/1819419
This commit is contained in:
parent
5813164d15
commit
a427d0c0e7
|
@ -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( 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_REDO, PL_EDITOR_FRAME::GetLayoutFromRedoList )
|
||||
EVT_TOOL( wxID_PRINT, PL_EDITOR_FRAME::ToPrinter )
|
||||
|
@ -169,7 +169,7 @@ void PL_EDITOR_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
|||
|
||||
case ID_POPUP_DESIGN_TREE_ITEM_DELETE:
|
||||
case ID_POPUP_ITEM_DELETE:
|
||||
case wxID_CUT:
|
||||
case wxID_DELETE:
|
||||
// Delete item, and select the previous item
|
||||
item = m_treePagelayout->GetPageLayoutSelectedItem();
|
||||
|
||||
|
|
|
@ -87,8 +87,7 @@ static EDA_HOTKEY HkMoveStartPoint( _HKI( "Move Start Point" ), HK_MOVE_START
|
|||
ID_POPUP_ITEM_MOVE_START_POINT );
|
||||
static EDA_HOTKEY HkMoveEndPoint( _HKI( "Move End Point" ), HK_MOVE_END_POINT, 'E',
|
||||
ID_POPUP_ITEM_MOVE_END_POINT );
|
||||
static EDA_HOTKEY HkDeleteItem( _HKI( "Delete Item" ), HK_DELETE_ITEM, WXK_DELETE,
|
||||
ID_POPUP_ITEM_DELETE );
|
||||
static EDA_HOTKEY HkDeleteItem( _HKI( "Delete Item" ), HK_DELETE_ITEM, WXK_DELETE, (int) wxID_DELETE );
|
||||
|
||||
// Common: hotkeys_basic.h
|
||||
static EDA_HOTKEY HkUndo( _HKI( "Undo" ), HK_UNDO, GR_KB_CTRL + 'Z', (int) wxID_UNDO );
|
||||
|
|
|
@ -113,7 +113,8 @@ void PL_EDITOR_FRAME::ReCreateMenuBar()
|
|||
|
||||
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:
|
||||
|
@ -129,7 +130,7 @@ void PL_EDITOR_FRAME::ReCreateMenuBar()
|
|||
AddMenuItem( viewMenu, ID_ZOOM_PAGE, msg, wxEmptyString, KiBitmap( zoom_fit_in_page_xpm ) );
|
||||
|
||||
msg = AddHotkeyName( _( "Zoom to Selection" ), PlEditorHotkeysDescr, HK_ZOOM_SELECTION );
|
||||
AddMenuItem( viewMenu, ID_ZOOM_SELECTION, msg, wxEmptyString, KiBitmap( zoom_area_xpm ) );
|
||||
AddMenuItem( viewMenu, ID_ZOOM_SELECTION, msg, wxEmptyString, KiBitmap( zoom_area_xpm ), wxITEM_CHECK );
|
||||
|
||||
viewMenu->AppendSeparator();
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ void PL_EDITOR_FRAME::ReCreateHToolbar( void )
|
|||
|
||||
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" ) );
|
||||
|
||||
KiScaledSeparator( m_mainToolBar, this );
|
||||
|
|
Loading…
Reference in New Issue