Eeschema: fix zoom change on undo/redo command.

It was a side effect of commit e10025 fixing another zoom issue.
Fixes #7170
https://gitlab.com/kicad/code/kicad/issues/7170
This commit is contained in:
jean-pierre charras 2021-01-18 16:07:09 +01:00
parent c016ed7940
commit d052524707
1 changed files with 3 additions and 0 deletions

View File

@ -1384,6 +1384,9 @@ void SCH_EDIT_FRAME::CommonSettingsChanged( bool aEnvVarsChanged, bool aTextVars
void SCH_EDIT_FRAME::OnPageSettingsChange()
{
// Store the current zoom level into the current screen before calling
// DisplayCurrentSheet() that set the zoom to GetScreen()->m_LastZoomLevel
GetScreen()->m_LastZoomLevel = GetCanvas()->GetView()->GetScale();
// Rebuild the sheet view (draw area and any other items):
DisplayCurrentSheet();
}