Don't reset page unless we have to.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15033
This commit is contained in:
parent
bd5954242e
commit
f892194be4
|
@ -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 );
|
||||
|
|
Loading…
Reference in New Issue