Prevent double-entry into footprint load
Avoids double-clicking on the footprint library symbol crashing due to overwriting the global footprint table by multiple instances Fixes https://gitlab.com/kicad/code/kicad/-/issues/17040
This commit is contained in:
parent
b346cde30b
commit
3435c6ebee
|
@ -257,6 +257,11 @@ protected:
|
||||||
if( fpid.IsEmpty() )
|
if( fpid.IsEmpty() )
|
||||||
fpid = m_preselect;
|
fpid = m_preselect;
|
||||||
|
|
||||||
|
// Disable the button until we have finished processing it. Normally this is not an issue
|
||||||
|
// but if the footprint chooser is loading for the first time, it can be slow enough that
|
||||||
|
// multiple clicks will cause multiple instances of the footprint loader process to start
|
||||||
|
Disable();
|
||||||
|
|
||||||
KIWAY_PLAYER* frame = m_dlg->Kiway().Player( FRAME_FOOTPRINT_CHOOSER, true, m_dlg );
|
KIWAY_PLAYER* frame = m_dlg->Kiway().Player( FRAME_FOOTPRINT_CHOOSER, true, m_dlg );
|
||||||
|
|
||||||
if( !m_symbolNetlist.empty() )
|
if( !m_symbolNetlist.empty() )
|
||||||
|
@ -269,6 +274,7 @@ protected:
|
||||||
SetValue( fpid );
|
SetValue( fpid );
|
||||||
|
|
||||||
frame->Destroy();
|
frame->Destroy();
|
||||||
|
Enable();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
Loading…
Reference in New Issue