Commit 74e83e92 authored by jean-pierre charras's avatar jean-pierre charras

Pcbnew: Fix Bug #1420074 (Crash when a footprint is added to the board (or...

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)
parent 0001bc28
......@@ -222,7 +222,8 @@ void CONTEXT_MENU::onMenuEvent( wxMenuEvent& aEvent )
// Under Linux, every submenu can have a separate event handler, under
// Windows all submenus are handled by the main menu.
#ifdef __WINDOWS__
if( !evt ) {
if( !evt )
{
// Try to find the submenu which holds the selected item
wxMenu* menu = NULL;
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.
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 );
pad->SetNetCode( NETINFO_LIST::UNCONNECTED );
pad->SetPosition( GetCrossHairPosition() );
......
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