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
This commit is contained in:
Jon Evans 2022-09-23 22:08:33 -04:00
parent 35520c78e4
commit f37086e840
1 changed files with 0 additions and 17 deletions

View File

@ -446,23 +446,6 @@ void LIB_TREE_MODEL_ADAPTER::FinishTreeInitialization()
void LIB_TREE_MODEL_ADAPTER::OnSize( wxSizeEvent& aEvent ) 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(); aEvent.Skip();
} }