When deleting pin row, show new highlight
When the user deletes a pin row, they need to see which row is now selected for them to delete again. Otherwise, deleting will have unexpected consequences
This commit is contained in:
parent
fda7d68243
commit
880f209563
|
@ -646,9 +646,11 @@ void DIALOG_LIB_EDIT_PIN_TABLE::OnDeleteRow( wxCommandEvent& event )
|
|||
for( auto pin : removedRow )
|
||||
m_pins.erase( std::find( m_pins.begin(), m_pins.end(), pin ) );
|
||||
|
||||
curRow = std::max( 0, curRow - 1 );
|
||||
m_grid->MakeCellVisible( curRow, m_grid->GetGridCursorCol() );
|
||||
curRow = std::min( curRow, m_grid->GetRows() - 1 );
|
||||
m_grid->GoToCell( curRow, m_grid->GetGridCursorCol() );
|
||||
m_grid->SetGridCursor( curRow, m_grid->GetGridCursorCol() );
|
||||
m_grid->SelectRow( curRow );
|
||||
|
||||
|
||||
updateSummary();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue