Browse Source

Avoid assertion with invalid width

After adjusting col 0, the new width might be too large to handle.  In
which case, allow the system to choose our best width
6.0.7
Seth Hillbrand 5 years ago
parent
commit
c9fb595f64
  1. 8
      eeschema/dialogs/panel_sym_lib_table.cpp

8
eeschema/dialogs/panel_sym_lib_table.cpp

@ -800,7 +800,13 @@ void PANEL_SYM_LIB_TABLE::adjustPathSubsGridColumns( int aWidth )
aWidth -= ( m_path_subs_grid->GetSize().x - m_path_subs_grid->GetClientSize().x );
m_path_subs_grid->AutoSizeColumn( 0 );
m_path_subs_grid->SetColSize( 1, aWidth - m_path_subs_grid->GetColSize( 0 ) );
int remaining_width = aWidth - m_path_subs_grid->GetColSize( 0 );
if( remaining_width < 0 )
m_path_subs_grid->SetColSize( 1, -1 );
else
m_path_subs_grid->SetColSize( 1, remaining_width );
}

Loading…
Cancel
Save