Revert "Make sure LIB_ID escape context allows for formatting constructs."
This reverts commit 02252be29d
.
This commit is contained in:
parent
b0f8055377
commit
40bdd26e39
|
@ -142,15 +142,7 @@ bool ConvertSmartQuotesAndDashes( wxString* aString )
|
|||
|
||||
wxString EscapeString( const wxString& aSource, ESCAPE_CONTEXT aContext )
|
||||
{
|
||||
wxString converted;
|
||||
std::vector<bool> braceStack; // true == formatting construct
|
||||
|
||||
auto hasFormattingPrefix =
|
||||
[&]()
|
||||
{
|
||||
static wxString prefixes = wxT( "~_^" );
|
||||
return !converted.IsEmpty() && prefixes.Find( converted.Last() ) >= 0;
|
||||
};
|
||||
wxString converted;
|
||||
|
||||
converted.reserve( aSource.length() );
|
||||
|
||||
|
@ -167,7 +159,7 @@ wxString EscapeString( const wxString& aSource, ESCAPE_CONTEXT aContext )
|
|||
}
|
||||
else if( aContext == CTX_LIBID )
|
||||
{
|
||||
if( c == '{' && !hasFormattingPrefix() )
|
||||
if( c == '{' )
|
||||
converted += wxT( "{brace}" );
|
||||
else if( c == '/' )
|
||||
converted += wxT( "{slash}" );
|
||||
|
@ -235,9 +227,7 @@ wxString EscapeString( const wxString& aSource, ESCAPE_CONTEXT aContext )
|
|||
converted += c;
|
||||
}
|
||||
else
|
||||
{
|
||||
converted += c;
|
||||
}
|
||||
}
|
||||
|
||||
return converted;
|
||||
|
|
|
@ -448,7 +448,7 @@ void DIALOG_LIB_SYMBOL_PROPERTIES::OnGridCellChanging( wxGridEvent& event )
|
|||
|
||||
void DIALOG_LIB_SYMBOL_PROPERTIES::OnSymbolNameText( wxCommandEvent& event )
|
||||
{
|
||||
if( !m_Parent->IsSymbolFromSchematic() || m_OptionPower->IsChecked() )
|
||||
if( !m_Parent->IsSymbolFromSchematic() )
|
||||
m_grid->SetCellValue( VALUE_FIELD, FDC_VALUE, m_SymbolNameCtrl->GetValue() );
|
||||
}
|
||||
|
||||
|
|
|
@ -502,7 +502,7 @@ void FIELDS_GRID_TABLE<T>::SetValue( int aRow, int aCol, const wxString &aValue
|
|||
value = fn.GetFullPath();
|
||||
}
|
||||
}
|
||||
else if( m_parentType == SCH_SYMBOL_T && aRow == VALUE_FIELD )
|
||||
else if( m_frame->IsType( FRAME_SCH_SYMBOL_EDITOR ) && aRow == VALUE_FIELD )
|
||||
{
|
||||
value = EscapeString( value, CTX_LIBID );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue