From 70cbf5984606a20a9b4236990485bc92a338c36c Mon Sep 17 00:00:00 2001 From: Franck Jullien Date: Mon, 23 Nov 2020 11:16:47 +0100 Subject: [PATCH] eeschema/intersheet: don't list own page --- eeschema/sch_text.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/eeschema/sch_text.cpp b/eeschema/sch_text.cpp index 06eeb59ec2..efa7e7368c 100644 --- a/eeschema/sch_text.cpp +++ b/eeschema/sch_text.cpp @@ -1127,6 +1127,11 @@ bool SCH_GLOBALLABEL::ResolveTextVar( wxString* token, int aDepth ) const pageListCopy.insert( pageListCopy.end(), it->second.begin(), it->second.end() ); std::sort( pageListCopy.begin(), pageListCopy.end() ); + wxString currentPage = Schematic()->CurrentSheet().GetPageNumber(); + pageListCopy.erase( std::remove( pageListCopy.begin(), + pageListCopy.end(), + currentPage ), pageListCopy.end() ); + token->Printf( "%s", settings.m_IntersheetRefsPrefix ); if( ( settings.m_IntersheetRefsFormatShort ) && ( pageListCopy.size() > 2 ) )