Commit d3f6e3d6 authored by Maciej Suminski's avatar Maciej Suminski

pcbnew: Fixes crash when a module is changed after modification in the module editor.

parent efd4c123
......@@ -408,6 +408,7 @@ bool DIALOG_EXCHANGE_MODULE::Change_1_Module( MODULE* aModule,
return false;
}
m_parent->Exchange_Module( aModule, newModule, aUndoPickList );
m_parent->GetBoard()->Add( newModule, ADD_APPEND );
if( aModule == m_currentModule )
......@@ -415,8 +416,6 @@ bool DIALOG_EXCHANGE_MODULE::Change_1_Module( MODULE* aModule,
m_WinMessages->AppendText( wxT( " OK\n" ) );
m_parent->Exchange_Module( aModule, newModule, aUndoPickList );
return true;
}
......
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