Some minor performance enhancements.
This commit is contained in:
parent
fac48ddafb
commit
f73042fe24
|
@ -111,24 +111,23 @@ void DS_DRAW_ITEM_BASE::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame,
|
|||
switch( dataItem->GetType() )
|
||||
{
|
||||
case DS_DATA_ITEM::DS_SEGMENT:
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Line" ), msg ) );
|
||||
aList.emplace_back( _( "Line" ), wxEmptyString );
|
||||
break;
|
||||
|
||||
case DS_DATA_ITEM::DS_RECT:
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Rectangle" ), msg ) );
|
||||
aList.emplace_back( _( "Rectangle" ), wxEmptyString );
|
||||
break;
|
||||
|
||||
case DS_DATA_ITEM::DS_TEXT:
|
||||
msg = static_cast<DS_DRAW_ITEM_TEXT*>( this )->GetShownText();
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Text" ), msg ) );
|
||||
aList.emplace_back( _( "Text" ), static_cast<DS_DRAW_ITEM_TEXT*>( this )->GetShownText() );
|
||||
break;
|
||||
|
||||
case DS_DATA_ITEM::DS_POLYPOLYGON:
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Imported Shape" ), msg ) );
|
||||
aList.emplace_back( _( "Imported Shape" ), wxEmptyString );
|
||||
break;
|
||||
|
||||
case DS_DATA_ITEM::DS_BITMAP:
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Image" ), msg ) );
|
||||
aList.emplace_back( _( "Image" ), wxEmptyString );
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -139,21 +138,21 @@ void DS_DRAW_ITEM_BASE::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame,
|
|||
default: msg = _( "All Pages" ); break;
|
||||
}
|
||||
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "First Page Option" ), msg ) );
|
||||
aList.emplace_back( _( "First Page Option" ), msg );
|
||||
|
||||
msg = MessageTextFromValue( EDA_UNITS::UNSCALED, dataItem->m_RepeatCount );
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Repeat Count" ), msg ) );
|
||||
aList.emplace_back( _( "Repeat Count" ), msg );
|
||||
|
||||
msg = MessageTextFromValue( EDA_UNITS::UNSCALED, dataItem->m_IncrementLabel );
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Repeat Label Increment" ), msg ) );
|
||||
aList.emplace_back( _( "Repeat Label Increment" ), msg );
|
||||
|
||||
msg.Printf( wxT( "(%s, %s)" ),
|
||||
MessageTextFromValue( aFrame->GetUserUnits(), dataItem->m_IncrementVector.x ),
|
||||
MessageTextFromValue( aFrame->GetUserUnits(), dataItem->m_IncrementVector.y ) );
|
||||
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Repeat Position Increment" ), msg ) );
|
||||
aList.emplace_back( _( "Repeat Position Increment" ), msg );
|
||||
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Comment" ), dataItem->m_Info ) );
|
||||
aList.emplace_back( _( "Comment" ), dataItem->m_Info );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -236,25 +236,21 @@ const EDA_RECT LIB_CIRCLE::GetBoundingBox() const
|
|||
|
||||
void LIB_CIRCLE::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList )
|
||||
{
|
||||
wxString msg;
|
||||
EDA_RECT bBox = GetBoundingBox();
|
||||
|
||||
LIB_ITEM::GetMsgPanelInfo( aFrame, aList );
|
||||
|
||||
msg = MessageTextFromValue( aFrame->GetUserUnits(), m_Width );
|
||||
aList.emplace_back( _( "Line Width" ), MessageTextFromValue( aFrame->GetUserUnits(),
|
||||
m_Width ) );
|
||||
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Line Width" ), msg ) );
|
||||
aList.emplace_back( _( "Radius" ), MessageTextFromValue( aFrame->GetUserUnits(),
|
||||
GetRadius() ) );
|
||||
|
||||
msg = MessageTextFromValue( aFrame->GetUserUnits(), GetRadius() );
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Radius" ), msg ) );
|
||||
|
||||
msg.Printf( wxT( "(%d, %d, %d, %d)" ),
|
||||
aList.emplace_back( _( "Bounding Box" ), wxString::Format( wxT( "(%d, %d, %d, %d)" ),
|
||||
bBox.GetOrigin().x,
|
||||
bBox.GetOrigin().y,
|
||||
bBox.GetEnd().x,
|
||||
bBox.GetEnd().y );
|
||||
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Bounding Box" ), msg ) );
|
||||
bBox.GetEnd().y ) );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -423,19 +423,17 @@ void LIB_FIELD::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_I
|
|||
|
||||
LIB_ITEM::GetMsgPanelInfo( aFrame, aList );
|
||||
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Field" ), GetName() ) );
|
||||
aList.emplace_back( _( "Field" ), GetName() );
|
||||
|
||||
// Don't use GetShownText() here; we want to show the user the variable references
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Text" ), UnescapeString( GetText() ) ) );
|
||||
aList.emplace_back( _( "Text" ), UnescapeString( GetText() ) );
|
||||
|
||||
msg = IsVisible() ? _( "Yes" ) : _( "No" );
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Visible" ), msg ) );
|
||||
aList.emplace_back( _( "Visible" ), IsVisible() ? _( "Yes" ) : _( "No" ) );
|
||||
|
||||
msg = GetTextStyleName();
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Style" ), msg ) );
|
||||
aList.emplace_back( _( "Style" ), GetTextStyleName() );
|
||||
|
||||
msg = MessageTextFromValue( aFrame->GetUserUnits(), GetTextWidth() );
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Text Size" ), msg ) );
|
||||
aList.emplace_back( _( "Text Size" ), MessageTextFromValue( aFrame->GetUserUnits(),
|
||||
GetTextWidth() ) );
|
||||
|
||||
switch ( GetHorizJustify() )
|
||||
{
|
||||
|
@ -444,7 +442,7 @@ void LIB_FIELD::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_I
|
|||
case GR_TEXT_HJUSTIFY_RIGHT: msg = _( "Right" ); break;
|
||||
}
|
||||
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "H Justification" ), msg ) );
|
||||
aList.emplace_back( _( "H Justification" ), msg );
|
||||
|
||||
switch ( GetVertJustify() )
|
||||
{
|
||||
|
@ -453,7 +451,7 @@ void LIB_FIELD::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_I
|
|||
case GR_TEXT_VJUSTIFY_BOTTOM: msg = _( "Bottom" ); break;
|
||||
}
|
||||
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "V Justification" ), msg ) );
|
||||
aList.emplace_back( _( "V Justification" ), msg );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -51,14 +51,14 @@ void LIB_ITEM::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_IT
|
|||
{
|
||||
wxString msg;
|
||||
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Type" ), GetTypeName() ) );
|
||||
aList.emplace_back( _( "Type" ), GetTypeName() );
|
||||
|
||||
if( m_unit == 0 )
|
||||
msg = _( "All" );
|
||||
else
|
||||
msg.Printf( wxT( "%d" ), m_unit );
|
||||
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Unit" ), msg ) );
|
||||
aList.emplace_back( _( "Unit" ), msg );
|
||||
|
||||
if( m_convert == LIB_ITEM::LIB_CONVERT::BASE )
|
||||
msg = _( "no" );
|
||||
|
@ -67,7 +67,7 @@ void LIB_ITEM::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_IT
|
|||
else
|
||||
msg = wxT( "?" );
|
||||
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Converted" ), msg ) );
|
||||
aList.emplace_back( _( "Converted" ), msg );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1036,30 +1036,24 @@ void LIB_PIN::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITE
|
|||
{
|
||||
LIB_ITEM::GetMsgPanelInfo( aFrame, aList );
|
||||
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Name" ), UnescapeString( GetShownName() ) ) );
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Number" ), GetShownNumber() ) );
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Type" ), ElectricalPinTypeGetText( m_type ) ) );
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Style" ), PinShapeGetText( m_shape ) ) );
|
||||
aList.emplace_back( _( "Name" ), UnescapeString( GetShownName() ) );
|
||||
aList.emplace_back( _( "Number" ), GetShownNumber() );
|
||||
aList.emplace_back( _( "Type" ), ElectricalPinTypeGetText( m_type ) );
|
||||
aList.emplace_back( _( "Style" ), PinShapeGetText( m_shape ) );
|
||||
|
||||
wxString text = IsVisible() ? _( "Yes" ) : _( "No" );
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Style" ), text ) );
|
||||
aList.emplace_back( _( "Style" ), IsVisible() ? _( "Yes" ) : _( "No" ) );
|
||||
|
||||
// Display pin length
|
||||
text = StringFromValue( aFrame->GetUserUnits(), m_length );
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Length" ), text ) );
|
||||
aList.emplace_back( _( "Length" ), StringFromValue( aFrame->GetUserUnits(), m_length ) );
|
||||
|
||||
text = PinOrientationName( (unsigned) PinOrientationIndex( m_orientation ) );
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Orientation" ), text ) );
|
||||
int i = PinOrientationIndex( m_orientation );
|
||||
aList.emplace_back( _( "Orientation" ), PinOrientationName( (unsigned) i ) );
|
||||
|
||||
wxPoint pinpos = GetPosition();
|
||||
pinpos.y = -pinpos.y; // Display coord are top to bottom
|
||||
// lib items coord are bottom to top
|
||||
pinpos.y = -pinpos.y; // Display coords are top to bottom; lib item coords are bottom to top
|
||||
|
||||
text = MessageTextFromValue( aFrame->GetUserUnits(), pinpos.x );
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Pos X" ), text ) );
|
||||
|
||||
text = MessageTextFromValue( aFrame->GetUserUnits(), pinpos.y );
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Pos Y" ), text ) );
|
||||
aList.emplace_back( _( "Pos X" ), MessageTextFromValue( aFrame->GetUserUnits(), pinpos.x ) );
|
||||
aList.emplace_back( _( "Pos Y" ), MessageTextFromValue( aFrame->GetUserUnits(), pinpos.y ) );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -330,19 +330,17 @@ void LIB_POLYLINE::DeleteSegment( const wxPoint aPosition )
|
|||
|
||||
void LIB_POLYLINE::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList )
|
||||
{
|
||||
wxString msg;
|
||||
EDA_RECT bBox = GetBoundingBox();
|
||||
|
||||
LIB_ITEM::GetMsgPanelInfo( aFrame, aList );
|
||||
|
||||
msg = MessageTextFromValue( aFrame->GetUserUnits(), m_Width );
|
||||
aList.emplace_back( _( "Line Width" ), MessageTextFromValue( aFrame->GetUserUnits(), m_Width ) );
|
||||
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Line Width" ), msg ) );
|
||||
|
||||
msg.Printf( wxT( "(%d, %d, %d, %d)" ), bBox.GetOrigin().x,
|
||||
bBox.GetOrigin().y, bBox.GetEnd().x, bBox.GetEnd().y );
|
||||
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Bounding Box" ), msg ) );
|
||||
aList.emplace_back( _( "Bounding Box" ), wxString::Format( wxT( "(%d, %d, %d, %d)" ),
|
||||
bBox.GetOrigin().x,
|
||||
bBox.GetOrigin().y,
|
||||
bBox.GetEnd().x,
|
||||
bBox.GetEnd().y ) );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -185,9 +185,7 @@ void LIB_RECTANGLE::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PAN
|
|||
{
|
||||
LIB_ITEM::GetMsgPanelInfo( aFrame, aList );
|
||||
|
||||
wxString msg = MessageTextFromValue( aFrame->GetUserUnits(), m_Width );
|
||||
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Line Width" ), msg ) );
|
||||
aList.emplace_back( _( "Line Width" ), MessageTextFromValue( aFrame->GetUserUnits(), m_Width ) );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -346,13 +346,12 @@ void LIB_TEXT::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_IT
|
|||
LIB_ITEM::GetMsgPanelInfo( aFrame, aList );
|
||||
|
||||
// Don't use GetShownText() here; we want to show the user the variable references
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Text" ), UnescapeString( GetText() ) ) );
|
||||
aList.emplace_back( _( "Text" ), UnescapeString( GetText() ) );
|
||||
|
||||
msg = GetTextStyleName();
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Style" ), msg ) );
|
||||
aList.emplace_back( _( "Style" ), GetTextStyleName() );
|
||||
|
||||
msg = MessageTextFromValue( aFrame->GetUserUnits(), GetTextWidth() );
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Text Size" ), msg ) );
|
||||
aList.emplace_back( _( "Text Size" ), MessageTextFromValue( aFrame->GetUserUnits(),
|
||||
GetTextWidth() ) );
|
||||
|
||||
switch ( GetHorizJustify() )
|
||||
{
|
||||
|
@ -361,7 +360,7 @@ void LIB_TEXT::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_IT
|
|||
case GR_TEXT_HJUSTIFY_RIGHT: msg = _( "Right" ); break;
|
||||
}
|
||||
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "H Justification" ), msg ) );
|
||||
aList.emplace_back( _( "H Justification" ), msg );
|
||||
|
||||
switch ( GetVertJustify() )
|
||||
{
|
||||
|
@ -370,7 +369,7 @@ void LIB_TEXT::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_IT
|
|||
case GR_TEXT_VJUSTIFY_BOTTOM: msg = _( "Bottom" ); break;
|
||||
}
|
||||
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "V Justification" ), msg ) );
|
||||
aList.emplace_back( _( "V Justification" ), msg );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -198,12 +198,10 @@ BITMAPS SCH_BITMAP::GetMenuImage() const
|
|||
|
||||
void SCH_BITMAP::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList )
|
||||
{
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Bitmap" ), wxEmptyString ) );
|
||||
aList.emplace_back( _( "Bitmap" ), wxEmptyString );
|
||||
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Width" ), MessageTextFromValue( aFrame->GetUserUnits(),
|
||||
GetSize().x ) ) );
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Height" ), MessageTextFromValue( aFrame->GetUserUnits(),
|
||||
GetSize().y ) ) );
|
||||
aList.emplace_back( _( "Width" ), MessageTextFromValue( aFrame->GetUserUnits(), GetSize().x ) );
|
||||
aList.emplace_back( _( "Height" ), MessageTextFromValue( aFrame->GetUserUnits(), GetSize().y ) );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -490,7 +490,7 @@ void SCH_BUS_ENTRY_BASE::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame,
|
|||
case LAYER_BUS: msg = _( "Bus" ); break;
|
||||
}
|
||||
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Bus Entry Type" ), msg ) );
|
||||
aList.emplace_back( _( "Bus Entry Type" ), msg );
|
||||
|
||||
SCH_CONNECTION* conn = dynamic_cast<SCH_EDIT_FRAME*>( aFrame ) ? Connection() : nullptr;
|
||||
|
||||
|
@ -507,7 +507,7 @@ void SCH_BUS_ENTRY_BASE::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame,
|
|||
if( netSettings.m_NetClassAssignments.count( netname ) )
|
||||
netclassName = netSettings.m_NetClassAssignments[ netname ];
|
||||
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Assigned Netclass" ), netclassName ) );
|
||||
aList.emplace_back( _( "Assigned Netclass" ), netclassName );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -398,47 +398,40 @@ void SCH_CONNECTION::SetSuffix( const wxString& aSuffix )
|
|||
|
||||
void SCH_CONNECTION::AppendInfoToMsgPanel( std::vector<MSG_PANEL_ITEM>& aList ) const
|
||||
{
|
||||
wxString msg, group_name;
|
||||
wxString msg, group_name, members;
|
||||
std::vector<wxString> group_members;
|
||||
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Connection Name" ), UnescapeString( Name() ) ) );
|
||||
aList.emplace_back( _( "Connection Name" ), UnescapeString( Name() ) );
|
||||
|
||||
// NOTE(JE) Disabling this for now, because net codes are generated in the netlist exporter
|
||||
// in order to avoid sort costs. It may make sense to just tear out net codes from the
|
||||
// CONNECTION_GRAPH entirely in the future, as they are mostly only useful for netlist exports.
|
||||
#if 0
|
||||
if( !IsBus() )
|
||||
{
|
||||
msg.Printf( "%d", m_net_code );
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Net Code" ), msg ) );
|
||||
}
|
||||
aList.emplace_back( _( "Net Code" ), wxString::Format( "%d", m_net_code ) );
|
||||
#endif
|
||||
|
||||
if( auto alias = m_graph->GetBusAlias( m_name ) )
|
||||
{
|
||||
msg.Printf( _( "Bus Alias %s Members" ), m_name );
|
||||
|
||||
wxString members;
|
||||
|
||||
for( const auto& member : alias->Members() )
|
||||
for( const wxString& member : alias->Members() )
|
||||
members << member << " ";
|
||||
|
||||
aList.push_back( MSG_PANEL_ITEM( msg, members ) );
|
||||
aList.emplace_back( msg, members );
|
||||
}
|
||||
else if( NET_SETTINGS::ParseBusGroup( m_name, &group_name, &group_members ) )
|
||||
{
|
||||
for( const auto& group_member : group_members )
|
||||
for( const wxString& group_member : group_members )
|
||||
{
|
||||
if( auto group_alias = m_graph->GetBusAlias( group_member ) )
|
||||
if( std::shared_ptr<BUS_ALIAS> group_alias = m_graph->GetBusAlias( group_member ) )
|
||||
{
|
||||
msg.Printf( _( "Bus Alias %s Members" ), group_alias->GetName() );
|
||||
|
||||
wxString members;
|
||||
|
||||
for( const auto& member : group_alias->Members() )
|
||||
for( const wxString& member : group_alias->Members() )
|
||||
members << member << " ";
|
||||
|
||||
aList.push_back( MSG_PANEL_ITEM( msg, members ) );
|
||||
aList.emplace_back( msg, members );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -450,18 +443,14 @@ void SCH_CONNECTION::AppendInfoToMsgPanel( std::vector<MSG_PANEL_ITEM>& aList )
|
|||
return;
|
||||
|
||||
if( IsBus() )
|
||||
{
|
||||
msg.Printf( "%d", m_bus_code );
|
||||
aList.push_back( MSG_PANEL_ITEM( "Bus Code", msg ) );
|
||||
}
|
||||
aList.emplace_back( "Bus Code", wxString::Format( "%d", m_bus_code ) );
|
||||
|
||||
msg.Printf( "%d", m_subgraph_code );
|
||||
aList.push_back( MSG_PANEL_ITEM( "Subgraph Code", msg ) );
|
||||
aList.emplace_back( "Subgraph Code", wxString::Format( "%d", m_subgraph_code ) );
|
||||
|
||||
if( auto driver = Driver() )
|
||||
if( SCH_ITEM* driver = Driver() )
|
||||
{
|
||||
msg.Printf( "%s at %p", driver->GetSelectMenuText( EDA_UNITS::MILLIMETRES ), driver );
|
||||
aList.push_back( MSG_PANEL_ITEM( "Connection Source", msg ) );
|
||||
aList.emplace_back( "Connection Source", msg );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -481,19 +481,17 @@ void SCH_FIELD::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_I
|
|||
{
|
||||
wxString msg;
|
||||
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Symbol Field" ), GetName() ) );
|
||||
aList.emplace_back( _( "Symbol Field" ), GetName() );
|
||||
|
||||
// Don't use GetShownText() here; we want to show the user the variable references
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Text" ), UnescapeString( GetText() ) ) );
|
||||
aList.emplace_back( _( "Text" ), UnescapeString( GetText() ) );
|
||||
|
||||
msg = IsVisible() ? _( "Yes" ) : _( "No" );
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Visible" ), msg ) );
|
||||
aList.emplace_back( _( "Visible" ), IsVisible() ? _( "Yes" ) : _( "No" ) );
|
||||
|
||||
msg = GetTextStyleName();
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Style" ), msg ) );
|
||||
aList.emplace_back( _( "Style" ), GetTextStyleName() );
|
||||
|
||||
msg = MessageTextFromValue( aFrame->GetUserUnits(), GetTextWidth() );
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Text Size" ), msg ) );
|
||||
aList.emplace_back( _( "Text Size" ), MessageTextFromValue( aFrame->GetUserUnits(),
|
||||
GetTextWidth() ) );
|
||||
|
||||
switch ( GetHorizJustify() )
|
||||
{
|
||||
|
@ -502,7 +500,7 @@ void SCH_FIELD::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_I
|
|||
case GR_TEXT_HJUSTIFY_RIGHT: msg = _( "Right" ); break;
|
||||
}
|
||||
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "H Justification" ), msg ) );
|
||||
aList.emplace_back( _( "H Justification" ), msg );
|
||||
|
||||
switch ( GetVertJustify() )
|
||||
{
|
||||
|
@ -511,7 +509,7 @@ void SCH_FIELD::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_I
|
|||
case GR_TEXT_VJUSTIFY_BOTTOM: msg = _( "Bottom" ); break;
|
||||
}
|
||||
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "V Justification" ), msg ) );
|
||||
aList.emplace_back( _( "V Justification" ), msg );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -881,14 +881,14 @@ void SCH_LINE::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_IT
|
|||
default: msg = _( "Graphical" ); break;
|
||||
}
|
||||
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Line Type" ), msg ) );
|
||||
aList.emplace_back( _( "Line Type" ), msg );
|
||||
|
||||
if( GetLineStyle() != GetEffectiveLineStyle() )
|
||||
msg = _( "from netclass" );
|
||||
else
|
||||
msg = GetLineStyleName( GetLineStyle() );
|
||||
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Line Style" ), msg ) );
|
||||
aList.emplace_back( _( "Line Style" ), msg );
|
||||
|
||||
SCH_CONNECTION* conn = dynamic_cast<SCH_EDIT_FRAME*>( aFrame ) ? Connection() : nullptr;
|
||||
|
||||
|
@ -905,7 +905,7 @@ void SCH_LINE::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_IT
|
|||
if( netSettings.m_NetClassAssignments.count( netname ) )
|
||||
netclassName = netSettings.m_NetClassAssignments[ netname ];
|
||||
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Assigned Netclass" ), netclassName ) );
|
||||
aList.emplace_back( _( "Assigned Netclass" ), netclassName );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -162,8 +162,7 @@ const EDA_RECT SCH_MARKER::GetBoundingBox() const
|
|||
|
||||
void SCH_MARKER::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList )
|
||||
{
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Electrical Rule Check Error" ),
|
||||
m_rcItem->GetErrorMessage() ) );
|
||||
aList.emplace_back( _( "Electrical Rule Check Error" ), m_rcItem->GetErrorMessage() );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -181,14 +181,14 @@ void SCH_PIN::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITE
|
|||
{
|
||||
wxString msg;
|
||||
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Type" ), _( "Pin" ) ) );
|
||||
aList.emplace_back( _( "Type" ), _( "Pin" ) );
|
||||
|
||||
if( m_libPin->GetUnit() == 0 )
|
||||
msg = _( "All" );
|
||||
else
|
||||
msg.Printf( wxT( "%d" ), m_libPin->GetUnit() );
|
||||
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Unit" ), msg ) );
|
||||
aList.emplace_back( _( "Unit" ), msg );
|
||||
|
||||
if( m_libPin->GetConvert() == LIB_ITEM::LIB_CONVERT::BASE )
|
||||
msg = _( "no" );
|
||||
|
@ -197,24 +197,19 @@ void SCH_PIN::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITE
|
|||
else
|
||||
msg = wxT( "?" );
|
||||
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Converted" ), msg ) );
|
||||
aList.emplace_back( _( "Converted" ), msg );
|
||||
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Name" ), GetShownName() ) );
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Number" ), GetShownNumber() ) );
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Type" ), ElectricalPinTypeGetText( GetType() ) ) );
|
||||
aList.emplace_back( _( "Name" ), GetShownName() );
|
||||
aList.emplace_back( _( "Number" ), GetShownNumber() );
|
||||
aList.emplace_back( _( "Type" ), ElectricalPinTypeGetText( GetType() ) );
|
||||
aList.emplace_back( _( "Style" ), PinShapeGetText( GetShape() ) );
|
||||
|
||||
msg = PinShapeGetText( GetShape() );
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Style" ), msg ) );
|
||||
aList.emplace_back( _( "Visible" ), IsVisible() ? _( "Yes" ) : _( "No" ) );
|
||||
|
||||
msg = IsVisible() ? _( "Yes" ) : _( "No" );
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Visible" ), msg ) );
|
||||
aList.emplace_back( _( "Length" ), StringFromValue( aFrame->GetUserUnits(), GetLength() ) );
|
||||
|
||||
// Display pin length
|
||||
msg = StringFromValue( aFrame->GetUserUnits(), GetLength() );
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Length" ), msg ) );
|
||||
|
||||
msg = PinOrientationName( (unsigned) PinOrientationIndex( GetOrientation() ) );
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Orientation" ), msg ) );
|
||||
int i = PinOrientationIndex( GetOrientation() );
|
||||
aList.emplace_back( _( "Orientation" ), PinOrientationName( (unsigned) i ) );
|
||||
|
||||
SCH_EDIT_FRAME* schframe = dynamic_cast<SCH_EDIT_FRAME*>( aFrame );
|
||||
SCH_SHEET_PATH* currentSheet = schframe ? &schframe->GetCurrentSheet() : nullptr;
|
||||
|
@ -223,17 +218,13 @@ void SCH_PIN::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITE
|
|||
aList.emplace_back( symbol->GetRef( currentSheet ), symbol->GetValue( currentSheet, true ) );
|
||||
|
||||
#if defined(DEBUG)
|
||||
|
||||
SCH_EDIT_FRAME* frame = dynamic_cast<SCH_EDIT_FRAME*>( aFrame );
|
||||
|
||||
if( !frame )
|
||||
return;
|
||||
|
||||
if( dynamic_cast<SCH_EDIT_FRAME*>( aFrame ) )
|
||||
{
|
||||
SCH_CONNECTION* conn = Connection();
|
||||
|
||||
if( conn )
|
||||
conn->AppendInfoToMsgPanel( aList );
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
|
|
@ -1373,20 +1373,17 @@ void SCH_SYMBOL::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_
|
|||
{
|
||||
if( m_part.get() != dummy() )
|
||||
{
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Reference" ), GetRef( currentSheet ) ) );
|
||||
aList.emplace_back( _( "Reference" ), GetRef( currentSheet ) );
|
||||
|
||||
msg = m_part->IsPower() ? _( "Power symbol" ) : _( "Value" );
|
||||
|
||||
aList.push_back( MSG_PANEL_ITEM( msg, GetValue( currentSheet, true ) ) );
|
||||
aList.emplace_back( msg, GetValue( currentSheet, true ) );
|
||||
|
||||
#if 0 // Display symbol flags, for debug only
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "flags" ),
|
||||
wxString::Format( "%X", GetEditFlags() ) ) );
|
||||
aList.emplace_back( _( "flags" ), wxString::Format( "%X", GetEditFlags() ) );
|
||||
#endif
|
||||
|
||||
// Display symbol reference in library and library
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Name" ),
|
||||
UnescapeString( GetLibId().GetLibItemName() ) ) );
|
||||
aList.emplace_back( _( "Name" ), UnescapeString( GetLibId().GetLibItemName() ) );
|
||||
|
||||
if( !m_part->IsRoot() )
|
||||
{
|
||||
|
@ -1397,15 +1394,15 @@ void SCH_SYMBOL::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_
|
|||
if( parent )
|
||||
msg = parent->GetName();
|
||||
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Alias of" ), UnescapeString( msg ) ) );
|
||||
aList.emplace_back( _( "Alias of" ), UnescapeString( msg ) );
|
||||
}
|
||||
else if( !m_lib_id.GetLibNickname().empty() )
|
||||
{
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Library" ), m_lib_id.GetLibNickname() ) );
|
||||
aList.emplace_back( _( "Library" ), m_lib_id.GetLibNickname() );
|
||||
}
|
||||
else
|
||||
{
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Library" ), _( "Undefined!!!" ) ) );
|
||||
aList.emplace_back( _( "Library" ), _( "Undefined!!!" ) );
|
||||
}
|
||||
|
||||
// Display the current associated footprint, if exists.
|
||||
|
@ -1414,32 +1411,28 @@ void SCH_SYMBOL::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_
|
|||
if( msg.IsEmpty() )
|
||||
msg = _( "<Unknown>" );
|
||||
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Footprint" ), msg ) );
|
||||
aList.emplace_back( _( "Footprint" ), msg );
|
||||
|
||||
// Display description of the symbol, and keywords found in lib
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Description" ), m_part->GetDescription(),
|
||||
DARKCYAN ) );
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Keywords" ), m_part->GetKeyWords() ) );
|
||||
aList.emplace_back( _( "Description" ), m_part->GetDescription() );
|
||||
aList.emplace_back( _( "Keywords" ), m_part->GetKeyWords() );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Reference" ), GetRef( currentSheet ) ) );
|
||||
aList.emplace_back( _( "Reference" ), GetRef( currentSheet ) );
|
||||
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Value" ), GetValue( currentSheet, true ) ) );
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Name" ), GetLibId().GetLibItemName() ) );
|
||||
aList.emplace_back( _( "Value" ), GetValue( currentSheet, true ) );
|
||||
aList.emplace_back( _( "Name" ), GetLibId().GetLibItemName() );
|
||||
|
||||
wxString libNickname = GetLibId().GetLibNickname();
|
||||
|
||||
if( libNickname.empty() )
|
||||
{
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Library" ), _( "No library defined!" ) ) );
|
||||
}
|
||||
msg = _( "No library defined!" );
|
||||
else
|
||||
{
|
||||
msg.Printf( _( "Symbol not found in %s!" ), libNickname );
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Library" ), msg ) );
|
||||
}
|
||||
|
||||
aList.emplace_back( _( "Library" ), msg );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -750,14 +750,11 @@ void SCH_TEXT::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_IT
|
|||
}
|
||||
|
||||
// Don't use GetShownText() here; we want to show the user the variable references
|
||||
aList.push_back( MSG_PANEL_ITEM( msg, UnescapeString( GetText() ) ) );
|
||||
aList.emplace_back( msg, UnescapeString( GetText() ) );
|
||||
|
||||
// Display electrical type if it is relevant
|
||||
if( Type() == SCH_GLOBAL_LABEL_T || Type() == SCH_HIER_LABEL_T || Type() == SCH_SHEET_PIN_T )
|
||||
{
|
||||
msg = getElectricalTypeLabel( GetShape() );
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Type" ), msg ) );
|
||||
}
|
||||
aList.emplace_back( _( "Type" ), getElectricalTypeLabel( GetShape() ) );
|
||||
|
||||
wxString textStyle[] = { _( "Normal" ), _( "Italic" ), _( "Bold" ), _( "Bold Italic" ) };
|
||||
int style = 0;
|
||||
|
@ -768,11 +765,10 @@ void SCH_TEXT::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_IT
|
|||
if( IsBold() )
|
||||
style += 2;
|
||||
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Style" ), textStyle[style] ) );
|
||||
aList.emplace_back( _( "Style" ), textStyle[style] );
|
||||
|
||||
// Display text size (X or Y value, with are the same value in Eeschema)
|
||||
msg = MessageTextFromValue( aFrame->GetUserUnits(), GetTextWidth() );
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Text Size" ), msg ) );
|
||||
aList.emplace_back( _( "Text Size" ), MessageTextFromValue( aFrame->GetUserUnits(),
|
||||
GetTextWidth() ) );
|
||||
|
||||
switch( GetLabelSpinStyle() )
|
||||
{
|
||||
|
@ -783,7 +779,7 @@ void SCH_TEXT::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_IT
|
|||
default: msg = wxT( "???" ); break;
|
||||
}
|
||||
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Justification" ), msg ) );
|
||||
aList.emplace_back( _( "Justification" ), msg );
|
||||
|
||||
SCH_CONNECTION* conn = dynamic_cast<SCH_EDIT_FRAME*>( aFrame ) ? Connection() : nullptr;
|
||||
|
||||
|
@ -799,7 +795,7 @@ void SCH_TEXT::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_IT
|
|||
if( netSettings.m_NetClassAssignments.count( netname ) )
|
||||
{
|
||||
const wxString& netclassName = netSettings.m_NetClassAssignments[ netname ];
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Assigned Netclass" ), netclassName ) );
|
||||
aList.emplace_back( _( "Assigned Netclass" ), netclassName );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -788,21 +788,16 @@ void PCB_TRACK::GetMsgPanelInfoBase_Common( EDA_DRAW_FRAME* aFrame,
|
|||
|
||||
#if 0 // Enable for debugging
|
||||
if( GetBoard() )
|
||||
{
|
||||
// Display net code:
|
||||
msg.Printf( wxT( "%d" ), GetNetCode() );
|
||||
aList.emplace_back( _( "NetCode" ), msg );
|
||||
}
|
||||
aList.emplace_back( _( "NetCode" ), wxString::Format( wxT( "%d" ), GetNetCode() ) );
|
||||
|
||||
// Display the flags:
|
||||
msg.Printf( wxT( "0x%08X" ), m_flags );
|
||||
aList.emplace_back( wxT( "Flags" ), msg );
|
||||
aList.emplace_back( wxT( "Flags" ), wxString::Format( wxT( "0x%08X" ), m_flags ) );
|
||||
|
||||
// Display start and end positions:
|
||||
msg.Printf( wxT( "%d %d" ), m_Start.x, m_Start.y );
|
||||
aList.push_back( MSG_PANEL_ITEM( wxT( "Start pos" ), msg ) );
|
||||
msg.Printf( wxT( "%d %d" ), m_End.x, m_End.y );
|
||||
aList.push_back( MSG_PANEL_ITEM( wxT( "End pos" ), msg ) );
|
||||
aList.emplace_back( wxT( "Start pos" ), wxString::Format( wxT( "%d %d" ),
|
||||
m_Start.x,
|
||||
m_Start.y ) );
|
||||
aList.emplace_back( wxT( "End pos" ), wxString::Format( wxT( "%d %d" ),
|
||||
m_End.x,
|
||||
m_End.y ) );
|
||||
#endif
|
||||
|
||||
// Display the State member
|
||||
|
|
Loading…
Reference in New Issue