Use enums for column ids.
(The nickname, in particular, is no longer column 1.) Fixes https://gitlab.com/kicad/code/kicad/issues/14291
This commit is contained in:
parent
f59626004c
commit
927b5ae707
|
@ -572,8 +572,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 );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -588,8 +588,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();
|
||||
}
|
||||
|
|
|
@ -647,8 +647,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…
Reference in New Issue