From f37086e840bfe9a6743730333c8759d2921ac9dd Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Fri, 23 Sep 2022 22:08:33 -0400 Subject: [PATCH] Remove size handler that messes up column sizes Could not reproduce an issue on wxGTK. If this causes problems on other OS's, let's find a more appropriate fix --- common/lib_tree_model_adapter.cpp | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/common/lib_tree_model_adapter.cpp b/common/lib_tree_model_adapter.cpp index 17051f2bb7..3a24ba192f 100644 --- a/common/lib_tree_model_adapter.cpp +++ b/common/lib_tree_model_adapter.cpp @@ -446,23 +446,6 @@ void LIB_TREE_MODEL_ADAPTER::FinishTreeInitialization() void LIB_TREE_MODEL_ADAPTER::OnSize( wxSizeEvent& aEvent ) { - for( auto& it : m_colNameMap ) - { - if( it.second == m_columns[0] ) - { - // On GTK, this value in not immediately available, so don't - // set it to zero just because we haven't fully initialized - if( it.second->GetWidth() > 0 ) - m_colWidths[it.first] = it.second->GetWidth(); - - continue; - } - - wxASSERT( m_colWidths.count( it.first ) ); - it.second->SetWidth( m_colWidths[it.first] ); - } - - // Mandatory in any wxSizeEvent handler: aEvent.Skip(); }