Commit 571bca20 authored by jean-pierre charras's avatar jean-pierre charras

Pcbnew: fix Bug #975014

parent 100ea3a5
......@@ -283,8 +283,8 @@ void MODULE::SetPosition( const wxPoint& newpos )
wxPoint delta = newpos - m_Pos;
m_Pos += delta;
m_Reference->m_Pos += delta;
m_Value->m_Pos += delta;
m_Reference->SetPosition( m_Reference->GetPosition() + delta );
m_Value->SetPosition( m_Value->GetPosition() + delta );
for( D_PAD* pad = m_Pads; pad; pad = pad->Next() )
{
......
......@@ -480,6 +480,10 @@ void DIALOG_MODULE_BOARD_EDITOR::OnOkClick( wxCommandEvent& event )
m_CurrentModule->Draw( m_Parent->GetCanvas(), m_DC, GR_XOR );
}
// Init Fields (should be first, because they can be moved or/and flipped later):
m_CurrentModule->m_Reference->Copy( m_ReferenceCopy );
m_CurrentModule->m_Value->Copy( m_ValueCopy );
// Initialize masks clearances
m_CurrentModule->SetLocalClearance(
ReturnValueFromTextCtrl( *m_NetClearanceValueCtrl, m_Parent->GetInternalUnits() ) );
......@@ -549,10 +553,6 @@ void DIALOG_MODULE_BOARD_EDITOR::OnOkClick( wxCommandEvent& event )
m_CurrentModule->m_CntRot90 = m_CostRot90Ctrl->GetValue();
m_CurrentModule->m_CntRot180 = m_CostRot180Ctrl->GetValue();
// Init Fields:
m_CurrentModule->m_Reference->Copy( m_ReferenceCopy );
m_CurrentModule->m_Value->Copy( m_ValueCopy );
/* Now, set orientation. must be made after others changes,
* because rotation changes fields positions on board according to the new orientation
* (relative positions are not modified)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment