Cvpcb: fix possible crash when pressing the ESC key during some calculations.
It was due to calls to wxSafeYield() than can fire a Close Event during calculations modifying widgets inside the main frame. Fixes #8920 https://gitlab.com/kicad/code/kicad/issues/8920
This commit is contained in:
parent
3747cb50c9
commit
99b242069d
|
@ -176,7 +176,6 @@ void FOOTPRINTS_LISTBOX::SetFootprints( FOOTPRINT_LIST& aList, const wxString& a
|
|||
selection = 0;
|
||||
|
||||
DeselectAll();
|
||||
wxSafeYield();
|
||||
wxWindowUpdateLocker freeze( this );
|
||||
DeleteAllItems();
|
||||
|
||||
|
|
|
@ -85,13 +85,14 @@ bool CVPCB_MAINFRAME::ReadNetListAndFpFiles( const std::string& aNetlist )
|
|||
wxString msg;
|
||||
bool hasMissingNicks = false;
|
||||
|
||||
// Remark: *DO NOT* call wxSafeYield() or wxYield() during these calculations,
|
||||
// because a Close event (generated by the ESC key) can close some widgets during
|
||||
// refreshing them here, fired by the wxSafeYield() call.
|
||||
ReadSchematicNetlist( aNetlist );
|
||||
|
||||
if( m_symbolsListBox == nullptr )
|
||||
return false;
|
||||
|
||||
wxSafeYield();
|
||||
|
||||
LoadFootprintFiles();
|
||||
|
||||
BuildFootprintsListBox();
|
||||
|
|
Loading…
Reference in New Issue