Browse Source

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
6.0.7
Seth Hillbrand 4 years ago
parent
commit
880f209563
  1. 6
      eeschema/dialogs/dialog_lib_edit_pin_table.cpp

6
eeschema/dialogs/dialog_lib_edit_pin_table.cpp

@ -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…
Cancel
Save