From 3c0566d318d2e37ea278f3c67ef155adf538ec4c Mon Sep 17 00:00:00 2001 From: Ian McInerney Date: Mon, 11 Dec 2023 22:22:19 +0000 Subject: [PATCH] Don't allow copying markers Fixes KICAD-5FQ --- eeschema/tools/sch_editor_control.cpp | 5 +++++ pcbnew/tools/edit_tool.cpp | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/eeschema/tools/sch_editor_control.cpp b/eeschema/tools/sch_editor_control.cpp index aa2db91251..45ab118e0d 100644 --- a/eeschema/tools/sch_editor_control.cpp +++ b/eeschema/tools/sch_editor_control.cpp @@ -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; diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 846091b394..6f1dc83dad 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -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 ); + } } },