Browse Source

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

pull/1/head
Maciej Suminski 11 years ago
parent
commit
e46780f89f
  1. 4
      pcbnew/librairi.cpp
  2. 7
      pcbnew/loadcmp.cpp

4
pcbnew/librairi.cpp

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

7
pcbnew/loadcmp.cpp

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

Loading…
Cancel
Save