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

This commit is contained in:
Maciej Suminski 2014-07-22 09:50:40 +02:00
parent 38027eb998
commit e46780f89f
2 changed files with 10 additions and 1 deletions

View File

@ -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();

View File

@ -276,7 +276,12 @@ MODULE* PCB_BASE_FRAME::LoadModuleFromLibrary( const wxString& aLibrary,
module->SetFlags( IS_NEW );
module->SetLink( 0 );
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;