Display an error when pcbnew.kiface is not available for FP selector
DIALOG_COMPONENT_CHOOSE displays footprint preview when pcbnew kiface is available, but it crashed when it was not in the same directory as the executable. Now it displays an error message that allows the user to quickly identify the problem. Fixes: lp:1695005 * https://bugs.launchpad.net/kicad/+bug/1695005
This commit is contained in:
parent
5d252639fa
commit
3afef4e19d
|
@ -97,6 +97,9 @@ FOOTPRINT_SELECT_WIDGET::FOOTPRINT_SELECT_WIDGET( wxWindow* aParent,
|
||||||
void FOOTPRINT_SELECT_WIDGET::Load( KIWAY& aKiway, PROJECT& aProject )
|
void FOOTPRINT_SELECT_WIDGET::Load( KIWAY& aKiway, PROJECT& aProject )
|
||||||
{
|
{
|
||||||
m_kiway = &aKiway;
|
m_kiway = &aKiway;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
auto fp_lib_table = aProject.PcbFootprintLibs( aKiway );
|
auto fp_lib_table = aProject.PcbFootprintLibs( aKiway );
|
||||||
|
|
||||||
if( m_fp_loader.GetProgress() == 0 || !m_fp_loader.IsSameTable( fp_lib_table ) )
|
if( m_fp_loader.GetProgress() == 0 || !m_fp_loader.IsSameTable( fp_lib_table ) )
|
||||||
|
@ -107,6 +110,11 @@ void FOOTPRINT_SELECT_WIDGET::Load( KIWAY& aKiway, PROJECT& aProject )
|
||||||
}
|
}
|
||||||
|
|
||||||
m_progress_timer->Start( 200 );
|
m_progress_timer->Start( 200 );
|
||||||
|
}
|
||||||
|
catch( ... )
|
||||||
|
{
|
||||||
|
// no footprint libraries available
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue