Don't allow copying markers

Fixes KICAD-5FQ
This commit is contained in:
Ian McInerney 2023-12-11 22:22:19 +00:00
parent 078ba510b4
commit 3c0566d318
2 changed files with 10 additions and 0 deletions

View File

@ -1305,6 +1305,11 @@ bool SCH_EDITOR_CONTROL::doCopy( bool aUseDuplicateClipboard )
// and the field text is in it
selection.Add( item->GetParent() );
}
else if( item->Type() == SCH_MARKER_T )
{
// Don't let the markers be copied
selection.Remove( item );
}
}
STRING_FORMATTER formatter;

View File

@ -2712,6 +2712,11 @@ int EDIT_TOOL::copyToClipboard( const TOOL_EVENT& aEvent )
{
aCollector.Remove( item );
}
else if( item->Type() == PCB_MARKER_T )
{
// Don't allow copying marker objects
aCollector.Remove( item );
}
}
},