pcbnew: Adjust selection behavior in highlight net
Prefer non-zones in highlight net in the same way we do for the selection tool. Highlight net just has separate logic and was missed previously.
This commit is contained in:
parent
ceca3e526c
commit
502383b759
|
@ -100,12 +100,10 @@ const KICAD_T GENERAL_COLLECTOR::PadsOrModules[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
const KICAD_T GENERAL_COLLECTOR::PadsTracksOrZones[] = {
|
const KICAD_T GENERAL_COLLECTOR::PadsOrTracks[] = {
|
||||||
PCB_PAD_T,
|
PCB_PAD_T,
|
||||||
PCB_VIA_T,
|
PCB_VIA_T,
|
||||||
PCB_TRACE_T,
|
PCB_TRACE_T,
|
||||||
PCB_SEGZONE_T,
|
|
||||||
PCB_ZONE_AREA_T,
|
|
||||||
EOT
|
EOT
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -285,9 +285,9 @@ public:
|
||||||
static const KICAD_T PadsOrModules[];
|
static const KICAD_T PadsOrModules[];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A scan list for PADs, TRACKs, VIAs, or ZONEs
|
* A scan list for PADs, TRACKs, or VIAs
|
||||||
*/
|
*/
|
||||||
static const KICAD_T PadsTracksOrZones[];
|
static const KICAD_T PadsOrTracks[];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A scan list for MODULEs and their items (for Modedit)
|
* A scan list for MODULEs and their items (for Modedit)
|
||||||
|
|
|
@ -56,9 +56,13 @@ int PCB_EDIT_FRAME::SelectHighLight( wxDC* DC )
|
||||||
|
|
||||||
// optionally, modify the "guide" here as needed using its member functions
|
// optionally, modify the "guide" here as needed using its member functions
|
||||||
|
|
||||||
m_Collector->Collect( GetBoard(), GENERAL_COLLECTOR::PadsTracksOrZones,
|
m_Collector->Collect( GetBoard(), GENERAL_COLLECTOR::PadsOrTracks,
|
||||||
RefPos( true ), guide );
|
RefPos( true ), guide );
|
||||||
|
|
||||||
|
if( m_Collector->GetCount() == 0 )
|
||||||
|
m_Collector->Collect( GetBoard(), GENERAL_COLLECTOR::Zones,
|
||||||
|
RefPos( true ), guide );
|
||||||
|
|
||||||
BOARD_ITEM* item = (*m_Collector)[0];
|
BOARD_ITEM* item = (*m_Collector)[0];
|
||||||
|
|
||||||
if( item )
|
if( item )
|
||||||
|
|
|
@ -951,9 +951,13 @@ static bool highlightNet( TOOL_MANAGER* aToolMgr, const VECTOR2D& aPosition,
|
||||||
GENERAL_COLLECTOR collector;
|
GENERAL_COLLECTOR collector;
|
||||||
|
|
||||||
// Find a connected item for which we are going to highlight a net
|
// Find a connected item for which we are going to highlight a net
|
||||||
collector.Collect( board, GENERAL_COLLECTOR::PadsTracksOrZones,
|
collector.Collect( board, GENERAL_COLLECTOR::PadsOrTracks,
|
||||||
wxPoint( aPosition.x, aPosition.y ), guide );
|
wxPoint( aPosition.x, aPosition.y ), guide );
|
||||||
|
|
||||||
|
if( collector.GetCount() == 0 )
|
||||||
|
collector.Collect( board, GENERAL_COLLECTOR::Zones,
|
||||||
|
wxPoint( aPosition.x, aPosition.y ), guide );
|
||||||
|
|
||||||
for( int i = 0; i < collector.GetCount(); i++ )
|
for( int i = 0; i < collector.GetCount(); i++ )
|
||||||
{
|
{
|
||||||
if( collector[i]->Type() == PCB_PAD_T )
|
if( collector[i]->Type() == PCB_PAD_T )
|
||||||
|
|
Loading…
Reference in New Issue