From 9d770fe2431abd8245a0b9702b441ee8381c6278 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Wed, 16 Jul 2025 16:39:10 -0700 Subject: [PATCH] Add a bit of documentation to help future us --- eeschema/sch_sheet.cpp | 4 ++-- eeschema/sch_sheet.h | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/eeschema/sch_sheet.cpp b/eeschema/sch_sheet.cpp index 67fcf6e942..6ca36082c9 100644 --- a/eeschema/sch_sheet.cpp +++ b/eeschema/sch_sheet.cpp @@ -1442,13 +1442,13 @@ const SCH_SHEET_INSTANCE& SCH_SHEET::GetRootInstance() const } -wxString SCH_SHEET::getPageNumber( const KIID_PATH& aPath ) const +wxString SCH_SHEET::getPageNumber( const KIID_PATH& aParentPath ) const { wxString pageNumber; for( const SCH_SHEET_INSTANCE& instance : m_instances ) { - if( instance.m_Path == aPath ) + if( instance.m_Path == aParentPath ) { pageNumber = instance.m_PageNumber; break; diff --git a/eeschema/sch_sheet.h b/eeschema/sch_sheet.h index 5bc824d6a1..84aa2781f4 100644 --- a/eeschema/sch_sheet.h +++ b/eeschema/sch_sheet.h @@ -501,14 +501,15 @@ protected: bool addInstance( const KIID_PATH& aInstance ); /** - * Return the sheet page number for \a aInstance. + * Return the sheet page number for \a aParentPath. * * @warning The #KIID_PATH object must be a full hierarchical path which means the sheet * at index 0 must be the root sheet. + * @param aParentPath is the hierarchical path of the sheet that contains an instance of this SCH_SHEET * * @return the page number for the requested sheet instance. */ - wxString getPageNumber( const KIID_PATH& aInstance ) const; + wxString getPageNumber( const KIID_PATH& aParentPath ) const; /** * Set the page number for the sheet instance \a aInstance.