Strip returns, tabs and linefeeds from SCH fields.

Fixes: lp:1783285
* https://bugs.launchpad.net/kicad/+bug/1783285
This commit is contained in:
Jeff Young 2018-07-24 16:40:50 +01:00
parent 7acc0b89f9
commit 83a56263d0
1 changed files with 6 additions and 1 deletions

View File

@ -301,11 +301,16 @@ public:
if( aCol == REFERENCE || aCol == QUANTITY_COLUMN )
return; // Can't modify references or quantity
wxString value( aValue );
value.Replace( "\r", "\\r" );
value.Replace( "\n", "\\n" );
value.Replace( "\t", "\\t" );
DATA_MODEL_ROW& rowGroup = m_rows[ aRow ];
wxString fieldName = m_fieldNames[ aCol ];
for( const auto& ref : rowGroup.m_Refs )
m_dataStore[ ref.GetComp()->GetTimeStamp() ][ fieldName ] = aValue;
m_dataStore[ ref.GetComp()->GetTimeStamp() ][ fieldName ] = value;
m_edited = true;
}