Add wxDataView-style defensive code to wxListView usage.
Fixes https://gitlab.com/kicad/code/kicad/issues/8657
This commit is contained in:
parent
466536d509
commit
3269f45776
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in New Issue