From 76c328db847f366b73cd56b5a0510d23a35b7690 Mon Sep 17 00:00:00 2001 From: John Beard Date: Mon, 30 Sep 2024 16:22:26 +0100 Subject: [PATCH] SCH_PIN: Fix missing alt assign in copy ctor --- eeschema/sch_pin.cpp | 1 + qa/tests/eeschema/test_sch_pin.cpp | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/eeschema/sch_pin.cpp b/eeschema/sch_pin.cpp index fac162f579..c21ae50e7f 100644 --- a/eeschema/sch_pin.cpp +++ b/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 ); diff --git a/qa/tests/eeschema/test_sch_pin.cpp b/qa/tests/eeschema/test_sch_pin.cpp index c825cf0a33..e6f20cf2b7 100644 --- a/qa/tests/eeschema/test_sch_pin.cpp +++ b/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" ); } /**