Handle block selection removal of libraries in SYMBOL_LIB_TABLE dialog
Fixes: lp:1741543 * https://bugs.launchpad.net/kicad/+bug/1741543
This commit is contained in:
parent
a386da9ee9
commit
ac1771a9f0
|
@ -421,11 +421,20 @@ void DIALOG_SYMBOL_LIB_TABLE::deleteRowHandler( wxCommandEvent& event )
|
|||
// If no candidate, just delete the row with the grid cursor.
|
||||
wxArrayInt selectedRows = m_cur_grid->GetSelectedRows();
|
||||
wxGridCellCoordsArray cells = m_cur_grid->GetSelectedCells();
|
||||
wxGridCellCoordsArray blockTopLeft = m_cur_grid->GetSelectionBlockTopLeft();
|
||||
wxGridCellCoordsArray blockBotRight = m_cur_grid->GetSelectionBlockBottomRight();
|
||||
|
||||
// Add all row having cell selected to list:
|
||||
for( unsigned ii = 0; ii < cells.GetCount(); ii++ )
|
||||
selectedRows.Add( cells[ii].GetRow() );
|
||||
|
||||
// Handle block selection
|
||||
if( !blockTopLeft.IsEmpty() && !blockBotRight.IsEmpty() )
|
||||
{
|
||||
for( int i = blockTopLeft[0].GetRow(); i <= blockBotRight[0].GetRow(); ++i )
|
||||
selectedRows.Add( i );
|
||||
}
|
||||
|
||||
// Use the row having the grid cursor only if we have no candidate:
|
||||
if( selectedRows.size() == 0 && getCursorRow() >= 0 )
|
||||
selectedRows.Add( getCursorRow() );
|
||||
|
|
Loading…
Reference in New Issue