Fp editor: minor fixes:

- do not show the paste special context menu: it has no sense in this editor
- Paste command: fix incorrect rotation of pasted FP texts
This commit is contained in:
jean-pierre charras 2021-08-18 17:43:10 +02:00
parent 82849eda42
commit 5574682d44
2 changed files with 2 additions and 2 deletions

View File

@ -199,7 +199,7 @@ bool EDIT_TOOL::Init()
// Selection tool handles the context menu for some other tools, such as the Picker.
// Don't add things like Paste when another tool is active.
menu.AddItem( ACTIONS::paste, noActiveToolCondition, 150 );
menu.AddItem( ACTIONS::pasteSpecial, noActiveToolCondition, 150 );
menu.AddItem( ACTIONS::pasteSpecial, noActiveToolCondition && !inFootprintEditor, 150 );
menu.AddItem( ACTIONS::duplicate, SELECTION_CONDITIONS::NotEmpty, 150 );
menu.AddItem( ACTIONS::doDelete, SELECTION_CONDITIONS::NotEmpty, 150 );

View File

@ -659,7 +659,7 @@ static void pasteFootprintItemsToFootprintEditor( FOOTPRINT* aClipFootprint, BOA
if( text->GetType() != FP_TEXT::TEXT_is_DIVERS )
continue;
text->SetTextAngle( aClipFootprint->GetOrientation() );
text->SetTextAngle( text->GetTextAngle() + aClipFootprint->GetOrientation() );
text->SetParent( nullptr );
text->SetLocalCoord();