Defensive coding to attempt to prevent wxWidgets crash.

Fixes: lp:1756255
* https://bugs.launchpad.net/kicad/+bug/1756255
This commit is contained in:
Jeff Young 2018-03-16 19:01:50 +00:00
parent b8fd2f3c79
commit 1684fc735a
1 changed files with 6 additions and 0 deletions

View File

@ -177,6 +177,12 @@ void CMP_TREE_MODEL_ADAPTER_BASE::UpdateSearchString( wxString const& aSearch )
{
wxWindowUpdateLocker updateLock( m_widget );
// Even with the updateLock, wxWidgets sometimes ties its knickers in
// a knot when trying to run a wxdataview_selection_changed_callback()
// on a row that has been deleted.
// https://bugs.launchpad.net/kicad/+bug/1756255
m_widget->UnselectAll();
Cleared();
#ifndef __WINDOWS__
// The fastest method to update wxDataViewCtrl is to rebuild from