Added 'Paste' to eeschema context menus
Fixes: lp:1754891 * https://bugs.launchpad.net/kicad/+bug/1754891
This commit is contained in:
parent
d906acc0eb
commit
83efd6b8a3
|
@ -51,6 +51,7 @@ bool LIB_EDIT_FRAME::OnRightClick( const wxPoint& aPosition, wxMenu* PopMenu )
|
||||||
{
|
{
|
||||||
LIB_ITEM* item = GetDrawItem();
|
LIB_ITEM* item = GetDrawItem();
|
||||||
bool blockActive = GetScreen()->IsBlockActive();
|
bool blockActive = GetScreen()->IsBlockActive();
|
||||||
|
wxString msg;
|
||||||
|
|
||||||
if( blockActive )
|
if( blockActive )
|
||||||
{
|
{
|
||||||
|
@ -59,7 +60,7 @@ bool LIB_EDIT_FRAME::OnRightClick( const wxPoint& aPosition, wxMenu* PopMenu )
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
LIB_PART* part = GetCurPart();
|
LIB_PART* part = GetCurPart();
|
||||||
|
|
||||||
if( !part )
|
if( !part )
|
||||||
return true;
|
return true;
|
||||||
|
@ -99,12 +100,19 @@ bool LIB_EDIT_FRAME::OnRightClick( const wxPoint& aPosition, wxMenu* PopMenu )
|
||||||
}
|
}
|
||||||
else
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
SetDrawItem( item );
|
SetDrawItem( item );
|
||||||
bool not_edited = !item->InEditMode();
|
bool not_edited = !item->InEditMode();
|
||||||
wxString msg;
|
|
||||||
|
|
||||||
switch( item->Type() )
|
switch( item->Type() )
|
||||||
{
|
{
|
||||||
|
|
|
@ -192,6 +192,14 @@ bool SCH_EDIT_FRAME::OnRightClick( const wxPoint& aPosition, wxMenu* PopMenu )
|
||||||
|
|
||||||
if( item == NULL )
|
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 )
|
if( m_CurrentSheet->Last() != g_RootSheet )
|
||||||
{
|
{
|
||||||
msg = AddHotkeyName( _( "Leave Sheet" ), g_Schematic_Hokeys_Descr, HK_LEAVE_SHEET );
|
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 ) );
|
KiBitmap( leave_sheet_xpm ) );
|
||||||
PopMenu->AppendSeparator();
|
PopMenu->AppendSeparator();
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue