Expand zone info a little
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12479
This commit is contained in:
parent
35201eac52
commit
1b962a1660
|
@ -93,7 +93,9 @@ ZONE_SEARCH_HANDLER::ZONE_SEARCH_HANDLER( PCB_EDIT_FRAME* aFrame ) :
|
||||||
SEARCH_HANDLER( wxT( "Zones" ) ), m_frame( aFrame )
|
SEARCH_HANDLER( wxT( "Zones" ) ), m_frame( aFrame )
|
||||||
{
|
{
|
||||||
m_columnNames.emplace_back( wxT( "Name" ) );
|
m_columnNames.emplace_back( wxT( "Name" ) );
|
||||||
|
m_columnNames.emplace_back( wxT( "Net" ) );
|
||||||
m_columnNames.emplace_back( wxT( "Layer" ) );
|
m_columnNames.emplace_back( wxT( "Layer" ) );
|
||||||
|
m_columnNames.emplace_back( wxT( "Priority" ) );
|
||||||
m_columnNames.emplace_back( wxT( "X" ) );
|
m_columnNames.emplace_back( wxT( "X" ) );
|
||||||
m_columnNames.emplace_back( wxT( "Y" ) );
|
m_columnNames.emplace_back( wxT( "Y" ) );
|
||||||
}
|
}
|
||||||
|
@ -126,13 +128,28 @@ wxString ZONE_SEARCH_HANDLER::GetResultCell( int row, int col )
|
||||||
{
|
{
|
||||||
ZONE* zone = m_hitlist[row];
|
ZONE* zone = m_hitlist[row];
|
||||||
|
|
||||||
|
|
||||||
if( col == 0 )
|
if( col == 0 )
|
||||||
|
return zone->GetZoneName();
|
||||||
|
if( col == 1 )
|
||||||
return zone->GetNetname();
|
return zone->GetNetname();
|
||||||
else if( col == 1 )
|
|
||||||
return zone->GetLayerName();
|
|
||||||
else if( col == 2 )
|
else if( col == 2 )
|
||||||
return m_frame->MessageTextFromValue( zone->GetX() );
|
{
|
||||||
|
wxArrayString layers;
|
||||||
|
BOARD* board = m_frame->GetBoard();
|
||||||
|
|
||||||
|
for( PCB_LAYER_ID layer : zone->GetLayerSet().Seq() )
|
||||||
|
{
|
||||||
|
layers.Add( board->GetLayerName( layer ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
return wxJoin( layers, ',' );
|
||||||
|
}
|
||||||
else if( col == 3 )
|
else if( col == 3 )
|
||||||
|
return wxString::Format( "%d", zone->GetAssignedPriority() );
|
||||||
|
else if( col == 4 )
|
||||||
|
return m_frame->MessageTextFromValue( zone->GetX() );
|
||||||
|
else if( col == 5 )
|
||||||
return m_frame->MessageTextFromValue( zone->GetY() );
|
return m_frame->MessageTextFromValue( zone->GetY() );
|
||||||
|
|
||||||
return wxEmptyString;
|
return wxEmptyString;
|
||||||
|
|
|
@ -42,8 +42,13 @@
|
||||||
|
|
||||||
ZONE::ZONE( BOARD_ITEM_CONTAINER* aParent, bool aInFP ) :
|
ZONE::ZONE( BOARD_ITEM_CONTAINER* aParent, bool aInFP ) :
|
||||||
BOARD_CONNECTED_ITEM( aParent, aInFP ? PCB_FP_ZONE_T : PCB_ZONE_T ),
|
BOARD_CONNECTED_ITEM( aParent, aInFP ? PCB_FP_ZONE_T : PCB_ZONE_T ),
|
||||||
m_area( 0.0 )
|
m_area( 0.0 ),
|
||||||
|
m_outlinearea( 0.0 )
|
||||||
{
|
{
|
||||||
|
m_Poly = new SHAPE_POLY_SET(); // Outlines
|
||||||
|
m_cornerSmoothingType = ZONE_SETTINGS::SMOOTHING_NONE;
|
||||||
|
m_cornerRadius = 0;
|
||||||
|
m_zoneName = wxEmptyString;
|
||||||
m_CornerSelection = nullptr; // no corner is selected
|
m_CornerSelection = nullptr; // no corner is selected
|
||||||
m_isFilled = false; // fill status : true when the zone is filled
|
m_isFilled = false; // fill status : true when the zone is filled
|
||||||
m_teardropType = TEARDROP_TYPE::TD_NONE;
|
m_teardropType = TEARDROP_TYPE::TD_NONE;
|
||||||
|
@ -53,7 +58,6 @@ ZONE::ZONE( BOARD_ITEM_CONTAINER* aParent, bool aInFP ) :
|
||||||
m_priority = 0;
|
m_priority = 0;
|
||||||
SetIsRuleArea( aInFP ); // Zones living in footprints have the rule area option
|
SetIsRuleArea( aInFP ); // Zones living in footprints have the rule area option
|
||||||
SetLocalFlags( 0 ); // flags temporary used in zone calculations
|
SetLocalFlags( 0 ); // flags temporary used in zone calculations
|
||||||
m_Poly = new SHAPE_POLY_SET(); // Outlines
|
|
||||||
m_fillVersion = 5; // set the "old" way to build filled polygon areas (< 6.0.x)
|
m_fillVersion = 5; // set the "old" way to build filled polygon areas (< 6.0.x)
|
||||||
|
|
||||||
aParent->GetZoneSettings().ExportSetting( *this );
|
aParent->GetZoneSettings().ExportSetting( *this );
|
||||||
|
@ -167,6 +171,7 @@ void ZONE::InitDataFromSrcInCopyCtor( const ZONE& aZone )
|
||||||
|
|
||||||
m_netinfo = aZone.m_netinfo;
|
m_netinfo = aZone.m_netinfo;
|
||||||
m_area = aZone.m_area;
|
m_area = aZone.m_area;
|
||||||
|
m_outlinearea = aZone.m_outlinearea;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue