Browse Source

Don't delete default intersheetrefs field from global labels.

Fixes https://gitlab.com/kicad/code/kicad/issues/14493
newinvert
Jeff Young 3 years ago
parent
commit
a226f7fc14
  1. 5
      eeschema/sch_label.h
  2. 2
      eeschema/tools/sch_edit_tool.cpp

5
eeschema/sch_label.h

@ -100,6 +100,11 @@ public:
m_fields = aFields; // vector copying, length is changed possibly
}
void AddFields( const std::vector<SCH_FIELD>& aFields )
{
m_fields.insert( m_fields.end(), aFields.begin(), aFields.end() );
}
/**
* Increment the label text, if it ends with a number.
*

2
eeschema/tools/sch_edit_tool.cpp

@ -2165,7 +2165,7 @@ int SCH_EDIT_TOOL::ChangeTextType( const TOOL_EVENT& aEvent )
SCH_LABEL_BASE* new_label = dynamic_cast<SCH_LABEL_BASE*>( newtext );
if( label && new_label )
new_label->SetFields( label->GetFields() );
new_label->AddFields( label->GetFields() );
if( selected )
m_toolMgr->RunAction( EE_ACTIONS::removeItemFromSel, true, item );

Loading…
Cancel
Save