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.