Don't respond to Duplicate events while placing multiple copies of a symbol.
It doesn't really make any sense as clicking will just create another copy as well. Fixes https://gitlab.com/kicad/code/kicad/issues/13253
This commit is contained in:
parent
5dce8323e8
commit
ba4a7a979a
|
@ -301,7 +301,7 @@ int SCH_DRAWING_TOOLS::PlaceSymbol( const TOOL_EVENT& aEvent )
|
|||
{
|
||||
m_toolMgr->RunAction( EE_ACTIONS::clearSelection, true );
|
||||
|
||||
// Pick the footprint to be placed
|
||||
// Pick the symbol to be placed
|
||||
bool footprintPreviews = m_frame->eeconfig()->m_Appearance.footprint_preview;
|
||||
PICKED_SYMBOL sel = m_frame->PickSymbolFromLibTree( &filter, *historyList, true,
|
||||
1, 1, footprintPreviews );
|
||||
|
@ -412,6 +412,20 @@ int SCH_DRAWING_TOOLS::PlaceSymbol( const TOOL_EVENT& aEvent )
|
|||
}
|
||||
}
|
||||
}
|
||||
else if( evt->IsAction( &ACTIONS::duplicate ) )
|
||||
{
|
||||
if( symbol )
|
||||
{
|
||||
// This doesn't really make sense; we'll just end up dragging a stack of
|
||||
// objects so we ignore the duplicate and just carry on.
|
||||
wxBell();
|
||||
continue;
|
||||
}
|
||||
|
||||
// Exit. The duplicate will run in its own loop.
|
||||
m_frame->PopTool( aEvent );
|
||||
break;
|
||||
}
|
||||
else if( symbol && ( evt->IsAction( &ACTIONS::refreshPreview ) || evt->IsMotion() ) )
|
||||
{
|
||||
symbol->SetPosition( cursorPos );
|
||||
|
|
|
@ -790,6 +790,7 @@ int SCH_MOVE_TOOL::Main( const TOOL_EVENT& aEvent )
|
|||
{
|
||||
// This doesn't really make sense; we'll just end up dragging a stack of
|
||||
// objects so we ignore the duplicate and just carry on.
|
||||
wxBell();
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue