Pcbnew: Fix Bug #1420074 (Crash when a footprint is added to the board (or edited) from the footprint editor, if a new pad was added, because the net info of the new pad is broken in this case)
This commit is contained in:
parent
0001bc2844
commit
74e83e924a
|
@ -222,7 +222,8 @@ void CONTEXT_MENU::onMenuEvent( wxMenuEvent& aEvent )
|
||||||
// Under Linux, every submenu can have a separate event handler, under
|
// Under Linux, every submenu can have a separate event handler, under
|
||||||
// Windows all submenus are handled by the main menu.
|
// Windows all submenus are handled by the main menu.
|
||||||
#ifdef __WINDOWS__
|
#ifdef __WINDOWS__
|
||||||
if( !evt ) {
|
if( !evt )
|
||||||
|
{
|
||||||
// Try to find the submenu which holds the selected item
|
// Try to find the submenu which holds the selected item
|
||||||
wxMenu* menu = NULL;
|
wxMenu* menu = NULL;
|
||||||
FindItem( m_selected, &menu );
|
FindItem( m_selected, &menu );
|
||||||
|
|
|
@ -161,9 +161,10 @@ void PCB_BASE_FRAME::AddPad( MODULE* aModule, bool draw )
|
||||||
// Add the new pad to end of the module pad list.
|
// Add the new pad to end of the module pad list.
|
||||||
aModule->Pads().PushBack( pad );
|
aModule->Pads().PushBack( pad );
|
||||||
|
|
||||||
// Update the pad properties.
|
// Update the pad properties,
|
||||||
|
// and keep NETINFO_LIST::ORPHANED as net info
|
||||||
|
// which is the default when nets cannot be handled.
|
||||||
Import_Pad_Settings( pad, false );
|
Import_Pad_Settings( pad, false );
|
||||||
pad->SetNetCode( NETINFO_LIST::UNCONNECTED );
|
|
||||||
|
|
||||||
pad->SetPosition( GetCrossHairPosition() );
|
pad->SetPosition( GetCrossHairPosition() );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue