From b2cd97fd84558853c94146b11cb541bd94671014 Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Thu, 18 Feb 2021 12:39:28 -0500 Subject: [PATCH] Don't rotate/flip footprint texts along with the footprint --- pcbnew/tools/edit_tool.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 0063964c07..7064055900 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -1284,6 +1284,11 @@ int EDIT_TOOL::Rotate( const TOOL_EVENT& aEvent ) if( item->GetParent() && !aCollector.HasItem( item->GetParent() ) ) added_items.insert( item->GetParent() ); } + + // We can't rotate both a footprint and its text in the same operation, so if + // both are selected, remove the text + if( item->Type() == PCB_FP_TEXT_T && aCollector.HasItem( item->GetParent() ) ) + aCollector.Remove( item ); } for( BOARD_ITEM* item : added_items ) @@ -1538,6 +1543,11 @@ int EDIT_TOOL::Flip( const TOOL_EVENT& aEvent ) if( item->GetParent() && !aCollector.HasItem( item->GetParent() ) ) added_items.insert( item->GetParent() ); } + + // We can't flip both a footprint and its text in the same operation, so if + // both are selected, remove the text + if( item->Type() == PCB_FP_TEXT_T && aCollector.HasItem( item->GetParent() ) ) + aCollector.Remove( item ); } for( BOARD_ITEM* item : added_items )