From 89f124595c252632928ddb74754c89196e179bfa Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 6 Aug 2021 13:33:14 +0200 Subject: [PATCH] Revert "Cvpcb: fix possible crash when pressing the ESC key during some calculations." This reverts commit 99b242069d52cb6eef183e501bb6174d01ca4860 because it does not fix all cases. --- cvpcb/footprints_listbox.cpp | 1 + cvpcb/readwrite_dlgs.cpp | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cvpcb/footprints_listbox.cpp b/cvpcb/footprints_listbox.cpp index 2d367dc311..1673aee343 100644 --- a/cvpcb/footprints_listbox.cpp +++ b/cvpcb/footprints_listbox.cpp @@ -176,6 +176,7 @@ void FOOTPRINTS_LISTBOX::SetFootprints( FOOTPRINT_LIST& aList, const wxString& a selection = 0; DeselectAll(); + wxSafeYield(); wxWindowUpdateLocker freeze( this ); DeleteAllItems(); diff --git a/cvpcb/readwrite_dlgs.cpp b/cvpcb/readwrite_dlgs.cpp index a1eebc742e..7e85023d76 100644 --- a/cvpcb/readwrite_dlgs.cpp +++ b/cvpcb/readwrite_dlgs.cpp @@ -85,14 +85,13 @@ 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();