Do not allow selecting tracks if they are hidden
This is a complementary patch to dbafdd39
.
This commit is contained in:
parent
2dfc35a9d6
commit
2e42d5c006
|
@ -254,6 +254,8 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_ITEM* testItem, void* testData )
|
|||
break;
|
||||
|
||||
case PCB_TRACE_T:
|
||||
if( m_Guide->IgnoreTracks() )
|
||||
goto exit;
|
||||
break;
|
||||
|
||||
case PCB_ZONE_T:
|
||||
|
|
|
@ -178,6 +178,11 @@ public:
|
|||
*/
|
||||
virtual bool IgnoreMicroVias() const = 0;
|
||||
|
||||
/**
|
||||
* @return true if should ignore tracks
|
||||
*/
|
||||
virtual bool IgnoreTracks() const = 0;
|
||||
|
||||
/**
|
||||
* @return bool - true if Inspect() should use BOARD_ITEM::HitTest()
|
||||
* or false if Inspect() should use BOARD_ITEM::BoundsTest().
|
||||
|
@ -393,6 +398,7 @@ private:
|
|||
bool m_IgnoreThroughVias;
|
||||
bool m_IgnoreBlindBuriedVias;
|
||||
bool m_IgnoreMicroVias;
|
||||
bool m_IgnoreTracks;
|
||||
|
||||
public:
|
||||
|
||||
|
@ -434,6 +440,7 @@ public:
|
|||
m_IgnoreThroughVias = false;
|
||||
m_IgnoreBlindBuriedVias = false;
|
||||
m_IgnoreMicroVias = false;
|
||||
m_IgnoreTracks = false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -564,6 +571,9 @@ public:
|
|||
|
||||
bool IgnoreMicroVias() const override { return m_IgnoreMicroVias; }
|
||||
void SetIgnoreMicroVias( bool ignore ) { m_IgnoreMicroVias = ignore; }
|
||||
|
||||
bool IgnoreTracks() const override { return m_IgnoreTracks; }
|
||||
void SetIgnoreTracks( bool ignore ) { m_IgnoreTracks = ignore; }
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -688,6 +688,7 @@ GENERAL_COLLECTORS_GUIDE PCB_BASE_FRAME::GetCollectorsGuide()
|
|||
guide.SetIgnoreThroughVias( ! m_Pcb->IsElementVisible( LAYER_VIA_THROUGH ) );
|
||||
guide.SetIgnoreBlindBuriedVias( ! m_Pcb->IsElementVisible( LAYER_VIA_BBLIND ) );
|
||||
guide.SetIgnoreMicroVias( ! m_Pcb->IsElementVisible( LAYER_VIA_MICROVIA ) );
|
||||
guide.SetIgnoreTracks( ! m_Pcb->IsElementVisible( LAYER_TRACKS ) );
|
||||
|
||||
return guide;
|
||||
}
|
||||
|
|
|
@ -444,6 +444,7 @@ const GENERAL_COLLECTORS_GUIDE SELECTION_TOOL::getCollectorsGuide() const
|
|||
guide.SetIgnoreThroughVias( ! board()->IsElementVisible( LAYER_VIA_THROUGH ) );
|
||||
guide.SetIgnoreBlindBuriedVias( ! board()->IsElementVisible( LAYER_VIA_BBLIND ) );
|
||||
guide.SetIgnoreMicroVias( ! board()->IsElementVisible( LAYER_VIA_MICROVIA ) );
|
||||
guide.SetIgnoreTracks( ! board()->IsElementVisible( LAYER_TRACKS ) );
|
||||
|
||||
return guide;
|
||||
}
|
||||
|
@ -1543,6 +1544,13 @@ bool SELECTION_TOOL::selectable( const BOARD_ITEM* aItem ) const
|
|||
}
|
||||
break;
|
||||
|
||||
case PCB_TRACE_T:
|
||||
{
|
||||
if( !board()->IsElementVisible( LAYER_TRACKS ) )
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
||||
case PCB_VIA_T:
|
||||
{
|
||||
const VIA* via = static_cast<const VIA*>( aItem );
|
||||
|
|
Loading…
Reference in New Issue