From 1520a1d372a26d5626f99a4ca76e270e0c347670 Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Tue, 6 Sep 2022 09:18:34 -0400 Subject: [PATCH] Use cached untranslated header for looking up width --- common/lib_tree_model_adapter.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/lib_tree_model_adapter.cpp b/common/lib_tree_model_adapter.cpp index 265b0b9d38..cff881422d 100644 --- a/common/lib_tree_model_adapter.cpp +++ b/common/lib_tree_model_adapter.cpp @@ -397,8 +397,10 @@ void LIB_TREE_MODEL_ADAPTER::FinishTreeInitialization() for( ; idx < m_columns.size() - 1; idx++ ) { + wxASSERT( m_colIdxMap.count( idx ) ); + col = m_columns[idx]; - header = col->GetTitle(); + header = m_colIdxMap[idx]; wxASSERT( m_colWidths.count( header ) );