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() ...@@ -272,6 +272,10 @@ MODULE* FOOTPRINT_EDIT_FRAME::Import_Module()
// Display info : // Display info :
SetMsgPanel( module ); SetMsgPanel( module );
PlaceModule( module, NULL ); PlaceModule( module, NULL );
if( IsGalCanvasActive() )
module->SetPosition( wxPoint( 0, 0 ) );
GetBoard()->m_Status_Pcb = 0; GetBoard()->m_Status_Pcb = 0;
GetBoard()->BuildListOfNets(); GetBoard()->BuildListOfNets();
updateView(); updateView();
......
...@@ -276,7 +276,12 @@ MODULE* PCB_BASE_FRAME::LoadModuleFromLibrary( const wxString& aLibrary, ...@@ -276,7 +276,12 @@ MODULE* PCB_BASE_FRAME::LoadModuleFromLibrary( const wxString& aLibrary,
module->SetFlags( IS_NEW ); module->SetFlags( IS_NEW );
module->SetLink( 0 ); 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->SetPosition( curspos );
module->SetTimeStamp( GetNewTimeStamp() ); module->SetTimeStamp( GetNewTimeStamp() );
GetBoard()->m_Status_Pcb = 0; 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