Don't reset page unless we have to.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15033
This commit is contained in:
Jeff Young 2023-06-21 23:41:17 +01:00
parent bd5954242e
commit f892194be4
1 changed files with 7 additions and 2 deletions

View File

@ -311,8 +311,13 @@ void SCH_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList )
}
else if( status == UNDO_REDO::PAGESETTINGS )
{
SetCurrentSheet( *m_schematic->GetSheets().FindSheetForScreen( screen ) );
DisplayCurrentSheet();
SCH_SHEET_PATH& undoSheet = *m_schematic->GetSheets().FindSheetForScreen( screen );
if( GetCurrentSheet() != undoSheet )
{
SetCurrentSheet( undoSheet );
DisplayCurrentSheet();
}
// swap current settings with stored settings
DS_PROXY_UNDO_ITEM alt_item( this );