eagle: Strip newlines from description
Eeschema old format is line-terminated so the newlines in descriptions
will break the schematic file if saved.
Fixes: lp:1829707
* https://bugs.launchpad.net/kicad/+bug/1829707
(cherry picked from commit fb85612f81
)
This commit is contained in:
parent
1a3b129d1e
commit
598b140112
|
@ -676,6 +676,7 @@ void SCH_EAGLE_PLUGIN::loadSheet( wxXmlNode* aSheetNode, int aSheetIndex )
|
|||
if( descriptionNode )
|
||||
{
|
||||
des = descriptionNode->GetContent();
|
||||
des.Replace( "\n", "_", true );
|
||||
m_currentSheet->SetName( des );
|
||||
filename = des.ToStdString();
|
||||
}
|
||||
|
|
|
@ -222,7 +222,14 @@ void SYMBOL_TREE_SYNCHRONIZING_ADAPTER::GetValue( wxVariant& aVariant, wxDataVie
|
|||
|
||||
case 1:
|
||||
if( node->LibId == m_libMgr->GetCurrentLibId() )
|
||||
aVariant = m_libMgr->GetAlias( node->Name, node->Parent->Name )->GetDescription();
|
||||
{
|
||||
auto alias = m_libMgr->GetAlias( node->Name, node->Parent->Name );
|
||||
|
||||
if( alias )
|
||||
aVariant = alias->GetDescription();
|
||||
else
|
||||
aVariant = node->Desc;
|
||||
}
|
||||
else
|
||||
aVariant = node->Desc;
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue