symbol-editor: Fix MacOS segfault in lib_tree_model_adapter
In LIB_TREE_MODEL_ADAPTER::UpdateSearchString(), don't call AttachTo() on MacOS. Fixes https://gitlab.com/kicad/code/kicad/issues/3653 and https://gitlab.com/kicad/code/kicad/issues/3666
This commit is contained in:
parent
d9de28de35
commit
1e42d6abeb
|
@ -170,10 +170,12 @@ void LIB_TREE_MODEL_ADAPTER::UpdateSearchString( wxString const& aSearch )
|
|||
m_widget->UnselectAll();
|
||||
|
||||
Cleared();
|
||||
#ifndef __WINDOWS__
|
||||
#if defined( __LINUX__ )
|
||||
// The fastest method to update wxDataViewCtrl is to rebuild from
|
||||
// scratch by calling Cleared(). Linux requires to reassociate model to
|
||||
// display data, but Windows will create multiple associations.
|
||||
// On MacOS, this crashes kicad. See https://gitlab.com/kicad/code/kicad/issues/3666
|
||||
// and https://gitlab.com/kicad/code/kicad/issues/3653
|
||||
AttachTo( m_widget );
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue