Try to store the actual sheet #, but don't store 1 for non-root sheet.
Fixes https://gitlab.com/kicad/code/kicad/issues/5021
This commit is contained in:
parent
5c479e150d
commit
173493b1a8
|
@ -716,6 +716,13 @@ bool SCH_EDIT_FRAME::SaveProject()
|
|||
screen->SetFileName( tmpFn.GetFullPath() );
|
||||
}
|
||||
|
||||
std::vector<SCH_SHEET_PATH>& sheets = screen->GetClientSheetPaths();
|
||||
|
||||
if( sheets.size() == 1 )
|
||||
screen->m_ScreenNumber = sheets[0].GetPageNumber();
|
||||
else
|
||||
screen->m_ScreenNumber = 0; // multiple uses; no way to store the real sheet #
|
||||
|
||||
success &= SaveEEFile( screens.GetSheet( i ) );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue