Commit e46780f8 authored by Maciej Suminski's avatar Maciej Suminski

Modules loaded by the module editor are placed in the world origin (GAL).

parent 38027eb9
......@@ -272,6 +272,10 @@ MODULE* FOOTPRINT_EDIT_FRAME::Import_Module()
// Display info :
SetMsgPanel( module );
PlaceModule( module, NULL );
if( IsGalCanvasActive() )
module->SetPosition( wxPoint( 0, 0 ) );
GetBoard()->m_Status_Pcb = 0;
GetBoard()->BuildListOfNets();
updateView();
......
......@@ -276,7 +276,12 @@ MODULE* PCB_BASE_FRAME::LoadModuleFromLibrary( const wxString& aLibrary,
module->SetFlags( IS_NEW );
module->SetLink( 0 );
module->SetPosition( curspos );
if( IsGalCanvasActive() )
module->SetPosition( wxPoint( 0, 0 ) ); // cursor in GAL may not be initialized at the moment
else
module->SetPosition( curspos );
module->SetTimeStamp( GetNewTimeStamp() );
GetBoard()->m_Status_Pcb = 0;
......
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