Allow selecting pads of locked footprints when filter allows
Before the selection filter, this heuristic made sense, but now there is an explicit toggle to disable selection of locked items, so we want to be able to select pads when that toggle is enabled.
This commit is contained in:
parent
8735ebdc70
commit
f4a8275f3e
|
@ -1491,10 +1491,18 @@ bool SELECTION_TOOL::itemPassesFilter( BOARD_ITEM* aItem )
|
|||
break;
|
||||
|
||||
case PCB_PAD_T:
|
||||
{
|
||||
if( !m_filter.pads )
|
||||
return false;
|
||||
|
||||
// Parent footprint locking should apply to pads also
|
||||
D_PAD* pad = static_cast<D_PAD*>( aItem );
|
||||
|
||||
if( !m_filter.lockedItems && pad->GetParent() && pad->GetParent()->IsLocked() )
|
||||
return false;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case PCB_TRACE_T:
|
||||
case PCB_ARC_T:
|
||||
|
@ -1918,14 +1926,6 @@ bool SELECTION_TOOL::Selectable( const BOARD_ITEM* aItem, bool checkVisibilityOn
|
|||
{
|
||||
auto pad = static_cast<const D_PAD*>( aItem );
|
||||
|
||||
// In pcbnew, locked modules prevent individual pad selection.
|
||||
// In modedit, we don't enforce this as the module is assumed to be edited by design.
|
||||
if( !m_editModules && !checkVisibilityOnly )
|
||||
{
|
||||
if( pad->GetParent() && pad->GetParent()->IsLocked() )
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check render mode (from the Items tab) first
|
||||
switch( pad->GetAttribute() )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue