Check for a tree selection before checking it against the board item.
Fixes: lp:1833295 * https://bugs.launchpad.net/kicad/+bug/1833295
This commit is contained in:
parent
a6bbe907ee
commit
1996fba8a6
|
@ -572,10 +572,14 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
|||
break;
|
||||
|
||||
case ID_MODEDIT_EXPORT_PART:
|
||||
if( getTargetFPID() == GetLoadedFPID() )
|
||||
Export_Module( GetBoard()->m_Modules );
|
||||
{
|
||||
LIB_ID fpid = m_treePane->GetLibTree()->GetSelectedLibId();
|
||||
|
||||
if( fpid.IsValid() )
|
||||
Export_Module( LoadFootprint( fpid ) );
|
||||
else
|
||||
Export_Module( LoadFootprint( getTargetFPID() ) );
|
||||
Export_Module( GetBoard()->m_Modules );
|
||||
}
|
||||
break;
|
||||
|
||||
case ID_MODEDIT_CREATE_NEW_LIB:
|
||||
|
|
Loading…
Reference in New Issue