Commit ac8ee56e authored by Maciej Suminski's avatar Maciej Suminski
Browse files

Pasted module texts are rotated in the right way.

parent 5941f196
Loading
Loading
Loading
Loading
+6 −2
Original line number Original line Diff line number Diff line
@@ -618,12 +618,16 @@ int EDIT_TOOL::PasteItems( TOOL_EVENT& aEvent )
                {
                {
                    // Do not add reference/value - convert them to the common type
                    // Do not add reference/value - convert them to the common type
                    text->SetType( TEXTE_MODULE::TEXT_is_DIVERS );
                    text->SetType( TEXTE_MODULE::TEXT_is_DIVERS );
                    currentModule->Add( clone );
                    currentModule->Add( text );
                    text->SetLocalCoord();
                    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<EDGE_MODULE*>( clone ) )
                else if( EDGE_MODULE* edge = dyn_cast<EDGE_MODULE*>( clone ) )
                {
                {
                    currentModule->Add( clone );
                    currentModule->Add( edge );
                    edge->SetLocalCoord();
                    edge->SetLocalCoord();
                }
                }