Treat board edges same as graphics for locked/unlocked.

It would appear that not using the locked/unlocked graphics filters
is confusing too (see deleted comments in code).

Fixes https://gitlab.com/kicad/code/kicad/issues/8114
This commit is contained in:
Jeff Young 2021-04-04 10:26:12 +01:00
parent c88a66d340
commit 98e6a089ab
1 changed files with 10 additions and 18 deletions

View File

@ -114,11 +114,12 @@ void DIALOG_GLOBAL_DELETION::acceptPcbDelete()
delAll = true; delAll = true;
} }
else if( !IsOK( this, _( "Are you sure you want to delete the selected items?" ) ) ) else if( !IsOK( this, _( "Are you sure you want to delete the selected items?" ) ) )
{
return; return;
}
BOARD* pcb = m_Parent->GetBoard(); BOARD* pcb = m_Parent->GetBoard();
BOARD_COMMIT commit( m_Parent ); BOARD_COMMIT commit( m_Parent );
LSET layers_filter = LSET().set(); LSET layers_filter = LSET().set();
if( m_rbLayersOption->GetSelection() != 0 ) // Use current layer only if( m_rbLayersOption->GetSelection() != 0 ) // Use current layer only
@ -173,21 +174,12 @@ void DIALOG_GLOBAL_DELETION::acceptPcbDelete()
if( !delDrawings || !masque_layer[layer] ) if( !delDrawings || !masque_layer[layer] )
continue; continue;
if( layer == Edge_Cuts )
{
// We currently don't differentiate between locked and unlocked board
// edges. (If we did, we'd also need to add checkboxes to filter them
// as overloading m_drawingFilter* would be confusing.)
}
else
{
if( dwg->IsLocked() && !m_drawingFilterLocked->GetValue() ) if( dwg->IsLocked() && !m_drawingFilterLocked->GetValue() )
continue; continue;
if( !dwg->IsLocked() && !m_drawingFilterUnlocked->GetValue() ) if( !dwg->IsLocked() && !m_drawingFilterUnlocked->GetValue() )
continue; continue;
} }
}
else if( type == PCB_TEXT_T ) else if( type == PCB_TEXT_T )
{ {
if( !delTexts || !del_text_layers[layer] ) if( !delTexts || !del_text_layers[layer] )