Improve edit menu and use common hotkeys
This commit is contained in:
parent
62487fa891
commit
d2e6f3a0e6
|
@ -239,6 +239,11 @@ enum common_hotkey_id_commnand {
|
|||
HK_SAVE,
|
||||
HK_SAVEAS,
|
||||
HK_PRINT,
|
||||
HK_UNDO,
|
||||
HK_REDO,
|
||||
HK_EDIT_CUT,
|
||||
HK_EDIT_COPY,
|
||||
HK_EDIT_PASTE,
|
||||
HK_RESET_LOCAL_COORD,
|
||||
HK_SET_GRID_ORIGIN,
|
||||
HK_RESET_GRID_ORIGIN,
|
||||
|
@ -249,8 +254,6 @@ enum common_hotkey_id_commnand {
|
|||
HK_ZOOM_CENTER,
|
||||
HK_ZOOM_AUTO,
|
||||
HK_ZOOM_SELECTION,
|
||||
HK_UNDO,
|
||||
HK_REDO,
|
||||
HK_COMMON_END
|
||||
};
|
||||
|
||||
|
|
|
@ -192,19 +192,6 @@ static EDA_HOTKEY Hk3DViewer( _HKI( "3D Viewer" ), HK_3D_VIEWER, GR_KB_ALT + '3'
|
|||
|
||||
static EDA_HOTKEY HkHelp( _HKI( "Help (this window)" ), HK_HELP, '?' );
|
||||
|
||||
|
||||
/* Undo */
|
||||
static EDA_HOTKEY HkUndo( _HKI( "Undo" ), HK_UNDO, GR_KB_CTRL + 'Z', (int) wxID_UNDO );
|
||||
|
||||
/* Redo */
|
||||
#if !defined( __WXMAC__ )
|
||||
static EDA_HOTKEY HkRedo( _HKI( "Redo" ), HK_REDO, GR_KB_CTRL + 'Y', (int) wxID_REDO );
|
||||
#else
|
||||
static EDA_HOTKEY HkRedo( _HKI( "Redo" ), HK_REDO,
|
||||
GR_KB_SHIFT + GR_KB_CTRL + 'Z',
|
||||
(int) wxID_REDO );
|
||||
#endif
|
||||
|
||||
static EDA_HOTKEY HkSwitchTrackWidthToNext( _HKI( "Switch Track Width To Next" ),
|
||||
HK_SWITCH_TRACK_WIDTH_TO_NEXT, 'W' );
|
||||
|
||||
|
@ -251,13 +238,29 @@ static EDA_HOTKEY HkViaSizeInc( _HKI( "Increase Via Size" ), HK_VIA_SIZE_INC, '\
|
|||
|
||||
static EDA_HOTKEY HkViaSizeDec( _HKI( "Decrease Via Size" ), HK_VIA_SIZE_DEC, '\\' );
|
||||
|
||||
|
||||
static EDA_HOTKEY HkUndo( _HKI( "Undo" ), HK_UNDO, GR_KB_CTRL + 'Z', (int) wxID_UNDO );
|
||||
|
||||
#if !defined( __WXMAC__ )
|
||||
static EDA_HOTKEY HkRedo( _HKI( "Redo" ), HK_REDO, GR_KB_CTRL + 'Y', (int) wxID_REDO );
|
||||
#else
|
||||
static EDA_HOTKEY HkRedo( _HKI( "Redo" ), HK_REDO,
|
||||
GR_KB_SHIFT + GR_KB_CTRL + 'Z',
|
||||
(int) wxID_REDO );
|
||||
#endif
|
||||
|
||||
static EDA_HOTKEY HkEditCut( _HKI( "Cut" ), HK_EDIT_CUT, GR_KB_CTRL + 'X', (int) wxID_CUT );
|
||||
static EDA_HOTKEY HkEditCopy( _HKI( "Copy" ), HK_EDIT_COPY, GR_KB_CTRL + 'C', (int) wxID_COPY );
|
||||
static EDA_HOTKEY HkEditPaste( _HKI( "Paste" ), HK_EDIT_PASTE, GR_KB_CTRL + 'V', (int) wxID_PASTE );
|
||||
|
||||
// List of common hotkey descriptors
|
||||
EDA_HOTKEY* common_Hotkey_List[] =
|
||||
{
|
||||
&HkUndo, &HkRedo,
|
||||
&HkEditCut, &HkEditCopy, &HkEditPaste,
|
||||
&HkHelp, &HkZoomIn, &HkZoomOut,
|
||||
&HkZoomRedraw, &HkZoomCenter, &HkZoomAuto, &HkZoomSelection, &Hk3DViewer,
|
||||
&HkSwitchUnits, &HkResetLocalCoord, &HkSetGridOrigin, &HkResetGridOrigin,
|
||||
&HkUndo, &HkRedo,
|
||||
&HkMouseLeftClick,
|
||||
&HkMouseLeftDClick,
|
||||
&HkIncLayerAlhpa, &HkDecLayerAlhpa,
|
||||
|
|
|
@ -110,10 +110,7 @@ enum hotkey_id_commnand {
|
|||
HK_CUSTOM_TRACK_WIDTH,
|
||||
HK_DP_DIMENSIONS,
|
||||
HK_VIA_SIZE_INC,
|
||||
HK_VIA_SIZE_DEC,
|
||||
HK_EDIT_CUT,
|
||||
HK_EDIT_PASTE,
|
||||
HK_EDIT_COPY
|
||||
HK_VIA_SIZE_DEC
|
||||
};
|
||||
|
||||
// Full list of hotkey descriptors for board editor and footprint editor
|
||||
|
|
|
@ -471,6 +471,26 @@ void prepareEditMenu( wxMenu* aParentMenu, bool aUseGal )
|
|||
text = AddHotkeyName( _( "&Redo" ), g_Pcbnew_Editor_Hotkeys_Descr, HK_REDO );
|
||||
AddMenuItem( aParentMenu, wxID_REDO, text, HELP_REDO, KiBitmap( redo_xpm ) );
|
||||
|
||||
aParentMenu->AppendSeparator();
|
||||
|
||||
if( aUseGal )
|
||||
{
|
||||
text = AddHotkeyName( _( "&Cut" ), g_Pcbnew_Editor_Hotkeys_Descr, HK_EDIT_CUT );
|
||||
AddMenuItem( aParentMenu, ID_EDIT_CUT, text,
|
||||
_( "Cuts the selected item(s) to the Clipboard" ),
|
||||
KiBitmap( cut_xpm ) );
|
||||
|
||||
text = AddHotkeyName( _( "&Copy" ), g_Pcbnew_Editor_Hotkeys_Descr, HK_EDIT_COPY );
|
||||
AddMenuItem( aParentMenu, ID_EDIT_COPY, text,
|
||||
_( "Copies the selected item(s) to the Clipboard" ),
|
||||
KiBitmap( copy_xpm ) );
|
||||
|
||||
text = AddHotkeyName( _( "&Paste" ), g_Pcbnew_Editor_Hotkeys_Descr, HK_EDIT_PASTE );
|
||||
AddMenuItem( aParentMenu, ID_EDIT_PASTE, text,
|
||||
_( "Pastes item(s) from the Clipboard" ),
|
||||
KiBitmap( paste_xpm ) );
|
||||
}
|
||||
|
||||
AddMenuItem( aParentMenu, ID_PCB_DELETE_ITEM_BUTT,
|
||||
_( "&Delete" ), _( "Delete items" ),
|
||||
KiBitmap( delete_xpm ) );
|
||||
|
|
Loading…
Reference in New Issue