diff --git a/eeschema/libedit_onrightclick.cpp b/eeschema/libedit_onrightclick.cpp index 4f50c458c6..fd94f07aa3 100644 --- a/eeschema/libedit_onrightclick.cpp +++ b/eeschema/libedit_onrightclick.cpp @@ -51,6 +51,7 @@ bool LIB_EDIT_FRAME::OnRightClick( const wxPoint& aPosition, wxMenu* PopMenu ) { LIB_ITEM* item = GetDrawItem(); bool blockActive = GetScreen()->IsBlockActive(); + wxString msg; if( blockActive ) { @@ -59,7 +60,7 @@ bool LIB_EDIT_FRAME::OnRightClick( const wxPoint& aPosition, wxMenu* PopMenu ) return true; } - LIB_PART* part = GetCurPart(); + LIB_PART* part = GetCurPart(); if( !part ) return true; @@ -99,12 +100,19 @@ bool LIB_EDIT_FRAME::OnRightClick( const wxPoint& aPosition, wxMenu* PopMenu ) } else { + if( GetToolId() == ID_NO_TOOL_SELECTED ) + { + msg = AddHotkeyName( _( "&Paste" ), g_Libedit_Hokeys_Descr, HK_EDIT_PASTE ); + AddMenuItem( PopMenu, wxID_PASTE, msg, + _( "Pastes item(s) from the Clipboard" ), + KiBitmap( paste_xpm ) ); + } + return true; } SetDrawItem( item ); bool not_edited = !item->InEditMode(); - wxString msg; switch( item->Type() ) { diff --git a/eeschema/onrightclick.cpp b/eeschema/onrightclick.cpp index ee987b77e3..9dd84df53f 100644 --- a/eeschema/onrightclick.cpp +++ b/eeschema/onrightclick.cpp @@ -192,6 +192,14 @@ bool SCH_EDIT_FRAME::OnRightClick( const wxPoint& aPosition, wxMenu* PopMenu ) if( item == NULL ) { + if( GetToolId() == ID_NO_TOOL_SELECTED ) + { + msg = AddHotkeyName( _( "&Paste" ), g_Schematic_Hokeys_Descr, HK_EDIT_PASTE ); + AddMenuItem( PopMenu, wxID_PASTE, msg, + _( "Pastes item(s) from the Clipboard" ), + KiBitmap( paste_xpm ) ); + } + if( m_CurrentSheet->Last() != g_RootSheet ) { msg = AddHotkeyName( _( "Leave Sheet" ), g_Schematic_Hokeys_Descr, HK_LEAVE_SHEET ); @@ -199,6 +207,7 @@ bool SCH_EDIT_FRAME::OnRightClick( const wxPoint& aPosition, wxMenu* PopMenu ) KiBitmap( leave_sheet_xpm ) ); PopMenu->AppendSeparator(); } + return true; }