Library Editor: faster filtering on Windows

Preventing redraw by freezing wxDataViewTreeCtrl significantly
improves the performance.
This commit is contained in:
Maciej Suminski 2017-11-19 01:36:30 +01:00
parent 98c99ff129
commit 6b87c2d6b1
1 changed files with 2 additions and 0 deletions

View File

@ -144,6 +144,7 @@ void CMP_TREE_MODEL_ADAPTER_BASE::AddAliasList(
void CMP_TREE_MODEL_ADAPTER_BASE::UpdateSearchString( wxString const& aSearch )
{
m_widget->Freeze();
m_tree.ResetScore();
wxStringTokenizer tokenizer( aSearch );
@ -158,6 +159,7 @@ void CMP_TREE_MODEL_ADAPTER_BASE::UpdateSearchString( wxString const& aSearch )
filterContents();
ShowResults() || ShowPreselect() || ShowSingleLibrary();
m_widget->Thaw();
}