Add backspace hot key to Eeschema to leave current sheet.
This commit is contained in:
parent
fc15404947
commit
4cd392a6ae
|
@ -117,7 +117,8 @@ static EDA_HOTKEY HkZoomOut( _HKI( "Zoom Out" ), HK_ZOOM_OUT, GR_KB_CTRL + '-',
|
|||
|
||||
static EDA_HOTKEY HkHelp( _HKI( "Help (this window)" ), HK_HELP, '?' );
|
||||
static EDA_HOTKEY HkResetLocalCoord( _HKI( "Reset Local Coordinates" ), HK_RESET_LOCAL_COORD, ' ' );
|
||||
|
||||
static EDA_HOTKEY HkLeaveSheet( _HKI( "Leave Sheet" ), HK_LEAVE_SHEET, WXK_BACK,
|
||||
ID_POPUP_SCH_LEAVE_SHEET );
|
||||
|
||||
// Undo
|
||||
static EDA_HOTKEY HkUndo( _HKI( "Undo" ), HK_UNDO, GR_KB_CTRL + 'Z', (int) wxID_UNDO );
|
||||
|
@ -288,6 +289,7 @@ static EDA_HOTKEY* schematic_Hotkey_List[] =
|
|||
&HkAddBusEntry,
|
||||
&HkAddGraphicPolyLine,
|
||||
&HkAddGraphicText,
|
||||
&HkLeaveSheet,
|
||||
NULL
|
||||
};
|
||||
|
||||
|
@ -439,6 +441,7 @@ bool SCH_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition,
|
|||
case HK_ZOOM_REDRAW:
|
||||
case HK_ZOOM_CENTER:
|
||||
case HK_ZOOM_AUTO:
|
||||
case HK_LEAVE_SHEET:
|
||||
case HK_MOVEBLOCK_TO_DRAGBLOCK: // Switch to drag mode, when block moving
|
||||
case HK_SAVE_BLOCK: // Copy block to paste buffer.
|
||||
cmd.SetId( hotKey->m_IdMenuEvent );
|
||||
|
|
|
@ -76,7 +76,8 @@ enum hotkey_id_commnand {
|
|||
HK_SAVE_SCH,
|
||||
HK_LOAD_SCH,
|
||||
HK_LEFT_CLICK,
|
||||
HK_LEFT_DCLICK
|
||||
HK_LEFT_DCLICK,
|
||||
HK_LEAVE_SHEET
|
||||
};
|
||||
|
||||
// List of hotkey descriptors for Eeschema
|
||||
|
|
|
@ -252,9 +252,11 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
|
|||
_( "Navigate hierarchical sheets" ),
|
||||
KiBitmap( hierarchy_nav_xpm ) );
|
||||
|
||||
text = AddHotkeyName( _( "&Leave Sheet" ), g_Schematic_Hokeys_Descr, HK_LEAVE_SHEET );
|
||||
|
||||
AddMenuItem( viewMenu,
|
||||
ID_POPUP_SCH_LEAVE_SHEET,
|
||||
_( "&Leave Sheet" ),
|
||||
text,
|
||||
_( "Leave Sheet" ),
|
||||
KiBitmap( leave_sheet_xpm ) );
|
||||
|
||||
|
|
|
@ -315,8 +315,12 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
|||
break;
|
||||
|
||||
case ID_POPUP_SCH_LEAVE_SHEET:
|
||||
m_CurrentSheet->Pop();
|
||||
DisplayCurrentSheet();
|
||||
if( m_CurrentSheet->Last() != g_RootSheet )
|
||||
{
|
||||
m_CurrentSheet->Pop();
|
||||
DisplayCurrentSheet();
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case wxID_COPY: // really this is a Save block for paste
|
||||
|
|
|
@ -781,7 +781,6 @@ void SCH_EDIT_FRAME::OnUpdateSave( wxUpdateUIEvent& aEvent )
|
|||
SCH_SHEET_LIST sheetList;
|
||||
|
||||
aEvent.Enable( sheetList.IsModified() );
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -795,7 +794,6 @@ void SCH_EDIT_FRAME::OnUpdateSaveSheet( wxUpdateUIEvent& aEvent )
|
|||
void SCH_EDIT_FRAME::OnUpdateHierarchySheet( wxUpdateUIEvent& aEvent )
|
||||
{
|
||||
aEvent.Enable( m_CurrentSheet->Last() != g_RootSheet );
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue