Use virtual page number when real page numbers are blank

Fixes https://gitlab.com/kicad/code/kicad/-/issues/10158
This commit is contained in:
Roberto Fernandez Bautista 2022-01-01 18:21:37 +00:00
parent ea613cf448
commit a0d708e04d
1 changed files with 3 additions and 3 deletions

View File

@ -172,10 +172,10 @@ int SCH_SHEET_PATH::ComparePageNumAndName( const SCH_SHEET_PATH& aSheetPathToTes
if( pageNumComp == 0 )
{
wxString nameA = Last()->GetName();
wxString nameB = aSheetPathToTest.Last()->GetName();
int virtualPageA = GetVirtualPageNumber();
int virtualPageB = aSheetPathToTest.GetVirtualPageNumber();
return nameA.Cmp( nameB );
return virtualPageA > virtualPageB ? 1 : -1;
}
else
{