Browse Source

SCH_PIN: Fix missing alt assign in copy ctor

jobs
John Beard 1 year ago
parent
commit
76c328db84
  1. 1
      eeschema/sch_pin.cpp
  2. 7
      qa/tests/eeschema/test_sch_pin.cpp

1
eeschema/sch_pin.cpp

@ -202,6 +202,7 @@ SCH_PIN::SCH_PIN( const SCH_PIN& aPin ) :
m_hidden( aPin.m_hidden ),
m_numTextSize( aPin.m_numTextSize ),
m_nameTextSize( aPin.m_nameTextSize ),
m_alt( aPin.m_alt ),
m_isDangling( aPin.m_isDangling )
{
SetName( aPin.m_name );

7
qa/tests/eeschema/test_sch_pin.cpp

@ -113,6 +113,13 @@ BOOST_AUTO_TEST_CASE( Copy )
BOOST_CHECK_EQUAL( copied.GetParentSymbol(), m_parent_symbol );
BOOST_CHECK_EQUAL( copied.GetNumber(), m_lib_pin->GetNumber() );
BOOST_CHECK_EQUAL( copied.GetAlt(), wxEmptyString );
// Set some non-default values
copied.SetAlt( "alt" );
SCH_PIN copied2( copied );
BOOST_CHECK_EQUAL( copied2.GetAlt(), "alt" );
}
/**

Loading…
Cancel
Save