7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-18 16:29:18 +00:00

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

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