Sheets: check for duplicates using shown names
Otherwise sheet names using sheet variables may collide
This commit is contained in:
parent
bf59f1246b
commit
1bc4fc256a
|
@ -147,7 +147,7 @@ int ERC_TESTER::TestDuplicateSheetNames( bool aCreateMarker )
|
||||||
// We have found a second sheet: compare names
|
// We have found a second sheet: compare names
|
||||||
// we are using case insensitive comparison to avoid mistakes between
|
// we are using case insensitive comparison to avoid mistakes between
|
||||||
// similar names like Mysheet and mysheet
|
// similar names like Mysheet and mysheet
|
||||||
if( sheet->GetName().CmpNoCase( test_item->GetName() ) == 0 )
|
if( sheet->GetShownName().CmpNoCase( test_item->GetShownName() ) == 0 )
|
||||||
{
|
{
|
||||||
if( aCreateMarker )
|
if( aCreateMarker )
|
||||||
{
|
{
|
||||||
|
|
|
@ -100,6 +100,7 @@ public:
|
||||||
*/
|
*/
|
||||||
void SetFields( const std::vector<SCH_FIELD>& aFields );
|
void SetFields( const std::vector<SCH_FIELD>& aFields );
|
||||||
|
|
||||||
|
wxString GetShownName() const { return m_fields[SHEETNAME].GetShownText(); }
|
||||||
wxString GetName() const { return m_fields[ SHEETNAME ].GetText(); }
|
wxString GetName() const { return m_fields[ SHEETNAME ].GetText(); }
|
||||||
void SetName( const wxString& aName ) { m_fields[ SHEETNAME ].SetText( aName ); }
|
void SetName( const wxString& aName ) { m_fields[ SHEETNAME ].SetText( aName ); }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue