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

This commit is contained in:
Maciej Suminski
2014-09-15 16:21:48 +02:00
parent efd4c123eb
commit d3f6e3d623
+1 -2
View File
@@ -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;
}