Only clear link when adding footprint from library, cache, etc.
Fixes: lp:1792256 * https://bugs.launchpad.net/kicad/+bug/1792256
This commit is contained in:
parent
db5386467b
commit
dfe164e0dc
|
@ -369,6 +369,7 @@ void PCB_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
|
|||
if( module )
|
||||
{
|
||||
m_canvas->MoveCursorToCrossHair();
|
||||
module->SetLink( 0 );
|
||||
AddModuleToBoard( module );
|
||||
|
||||
if( aDC )
|
||||
|
|
|
@ -219,7 +219,6 @@ void PCB_BASE_FRAME::AddModuleToBoard( MODULE* module )
|
|||
GetBoard()->Add( module, ADD_APPEND );
|
||||
|
||||
module->SetFlags( IS_NEW );
|
||||
module->SetLink( 0 );
|
||||
|
||||
if( IsGalCanvasActive() )
|
||||
module->SetPosition( wxPoint( 0, 0 ) ); // cursor in GAL may not be initialized at the moment
|
||||
|
|
|
@ -474,6 +474,7 @@ int PCB_EDITOR_CONTROL::PlaceModule( const TOOL_EVENT& aEvent )
|
|||
if( module == NULL )
|
||||
continue;
|
||||
|
||||
module->SetLink( 0 );
|
||||
m_frame->AddModuleToBoard( module );
|
||||
commit.Added( module );
|
||||
module->SetPosition( wxPoint( cursorPos.x, cursorPos.y ) );
|
||||
|
|
Loading…
Reference in New Issue