Add wxDataView-style defensive code to wxListView usage.

Fixes https://gitlab.com/kicad/code/kicad/issues/8657
This commit is contained in:
Jeff Young 2021-06-22 22:24:33 +01:00
parent 466536d509
commit 3269f45776
2 changed files with 3 additions and 1 deletions

View File

@ -483,7 +483,7 @@ void RC_TREE_MODEL::DeleteItems( bool aCurrentOnly, bool aIncludeExclusions, boo
if( m_view )
{
m_view->UnselectAll();
wxYield();
wxSafeYield();
m_view->Freeze();
}

View File

@ -175,6 +175,8 @@ void FOOTPRINTS_LISTBOX::SetFootprints( FOOTPRINT_LIST& aList, const wxString& a
if( selection == wxNOT_FOUND )
selection = 0;
DeselectAll();
wxSafeYield();
wxWindowUpdateLocker freeze( this );
DeleteAllItems();