Fix a couple of escape-string issues.

Fixes https://gitlab.com/kicad/code/kicad/issues/9167
This commit is contained in:
Jeff Young 2021-09-14 18:29:45 +01:00
parent 754464cb3b
commit 3b121359ae
2 changed files with 6 additions and 5 deletions

View File

@ -31,6 +31,7 @@
#include <settings/settings_manager.h>
#include <symbol_editor/symbol_editor_settings.h>
#include <trigo.h>
#include <string_utils.h>
#include "sch_painter.h"
// small margin in internal units between the pin text and the pin line
@ -1022,7 +1023,7 @@ void LIB_PIN::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, MSG_PANEL_ITEMS& aList )
{
LIB_ITEM::GetMsgPanelInfo( aFrame, aList );
aList.push_back( MSG_PANEL_ITEM( _( "Name" ), GetShownName() ) );
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 ) ) );
@ -1178,15 +1179,15 @@ wxString LIB_PIN::GetSelectMenuText( EDA_UNITS aUnits ) const
if( !m_name.IsEmpty() )
{
return wxString::Format( _( "Pin %s [%s, %s, %s]" ),
m_number,
m_name,
GetShownNumber(),
UnescapeString( GetShownName() ),
GetElectricalTypeName(),
PinShapeGetText( m_shape ) );
}
else
{
return wxString::Format( _( "Pin %s [%s, %s]" ),
m_number,
GetShownNumber(),
GetElectricalTypeName(),
PinShapeGetText( m_shape ) );
}

View File

@ -1631,7 +1631,7 @@ wxString SCH_SYMBOL::GetSelectMenuText( EDA_UNITS aUnits ) const
{
return wxString::Format( _( "Symbol %s [%s]" ),
GetField( REFERENCE_FIELD )->GetShownText(),
GetLibId().GetLibItemName().wx_str() );
UnescapeString( GetLibId().GetLibItemName() ) );
}