From 327c8594c547c914c61edc65b2cc03f958ce902a Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 14:23:13 +0200 Subject: [PATCH] Pasted module texts are rotated in the right way. --- pcbnew/tools/edit_tool.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 6a0733cfcc..1eb1b37bee 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -618,12 +618,16 @@ int EDIT_TOOL::PasteItems( TOOL_EVENT& aEvent ) { // Do not add reference/value - convert them to the common type text->SetType( TEXTE_MODULE::TEXT_is_DIVERS ); - currentModule->Add( clone ); + currentModule->Add( text ); text->SetLocalCoord(); + + // Whyyyyyyyyyyyyyyyyyyyyyy?! All other items conform to rotation performed + // on its parent module, but texts are so independent.. + text->Rotate( text->GetPosition(), pastedModule->GetOrientation() ); } else if( EDGE_MODULE* edge = dyn_cast( clone ) ) { - currentModule->Add( clone ); + currentModule->Add( edge ); edge->SetLocalCoord(); }