Browse Source

Use enums for column ids.

(The nickname, in particular, is no longer column 1.)

Fixes https://gitlab.com/kicad/code/kicad/issues/14291
newinvert
Jeff Young 3 years ago
parent
commit
7252c7471c
  1. 8
      eeschema/dialogs/panel_sym_lib_table.cpp
  2. 4
      pcbnew/dialogs/panel_fp_lib_table.cpp

8
eeschema/dialogs/panel_sym_lib_table.cpp

@ -559,8 +559,8 @@ void PANEL_SYM_LIB_TABLE::browseLibrariesHandler( wxCommandEvent& event )
if( !filePathsList.IsEmpty() )
{
m_cur_grid->MakeCellVisible( m_cur_grid->GetNumberRows() - 1, 0 );
m_cur_grid->SetGridCursor( m_cur_grid->GetNumberRows() - 1, 1 );
m_cur_grid->MakeCellVisible( m_cur_grid->GetNumberRows() - 1, COL_ENABLED );
m_cur_grid->SetGridCursor( m_cur_grid->GetNumberRows() - 1, COL_NICKNAME );
}
}
@ -575,8 +575,8 @@ void PANEL_SYM_LIB_TABLE::appendRowHandler( wxCommandEvent& event )
int row = m_cur_grid->GetNumberRows() - 1;
// wx documentation is wrong, SetGridCursor does not make visible.
m_cur_grid->MakeCellVisible( row, 0 );
m_cur_grid->SetGridCursor( row, 1 );
m_cur_grid->MakeCellVisible( row, COL_ENABLED );
m_cur_grid->SetGridCursor( row, COL_NICKNAME );
m_cur_grid->EnableCellEditControl( true );
m_cur_grid->ShowCellEditControl();
}

4
pcbnew/dialogs/panel_fp_lib_table.cpp

@ -655,8 +655,8 @@ void PANEL_FP_LIB_TABLE::appendRowHandler( wxCommandEvent& event )
int last_row = m_cur_grid->GetNumberRows() - 1;
// wx documentation is wrong, SetGridCursor does not make visible.
m_cur_grid->MakeCellVisible( last_row, 0 );
m_cur_grid->SetGridCursor( last_row, 1 );
m_cur_grid->MakeCellVisible( last_row, COL_ENABLED );
m_cur_grid->SetGridCursor( last_row, COL_NICKNAME );
m_cur_grid->EnableCellEditControl( true );
m_cur_grid->ShowCellEditControl();
}

Loading…
Cancel
Save