From 1b5e1cd4d2b3fc05aa6df053ffc7fde427bdc838 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sat, 20 Jul 2019 14:26:46 +0200 Subject: [PATCH] Fix complements the fix b428d74: make best zoom taken in account immediately. --- eeschema/sch_edit_frame.cpp | 2 +- eeschema/viewlib_frame.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eeschema/sch_edit_frame.cpp b/eeschema/sch_edit_frame.cpp index 985a929845..61915336e2 100644 --- a/eeschema/sch_edit_frame.cpp +++ b/eeschema/sch_edit_frame.cpp @@ -290,7 +290,7 @@ SCH_EDIT_FRAME::SCH_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ): m_auimgr.Update(); GetToolManager()->RunAction( ACTIONS::gridPreset, true, m_LastGridSizeId ); - GetToolManager()->RunAction( ACTIONS::zoomFitScreen, false ); + GetToolManager()->RunAction( ACTIONS::zoomFitScreen, true ); if( GetCanvas() ) GetCanvas()->GetGAL()->SetGridVisibility( IsGridVisible() ); diff --git a/eeschema/viewlib_frame.cpp b/eeschema/viewlib_frame.cpp index 22d32fd627..047b0cf1de 100644 --- a/eeschema/viewlib_frame.cpp +++ b/eeschema/viewlib_frame.cpp @@ -183,7 +183,6 @@ LIB_VIEW_FRAME::LIB_VIEW_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrame m_auimgr.Update(); GetToolManager()->RunAction( ACTIONS::gridPreset, true, m_LastGridSizeId ); - GetToolManager()->RunAction( ACTIONS::zoomFitScreen, false ); if( !IsModal() ) // For modal mode, calling ShowModal() will show this frame { @@ -202,6 +201,7 @@ LIB_VIEW_FRAME::LIB_VIEW_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrame bbox.SetOrigin( -max_size_x /2, -max_size_y/2 ); bbox.SetSize( max_size_x, max_size_y ); GetCanvas()->GetView()->SetBoundary( bbox ); + GetToolManager()->RunAction( ACTIONS::zoomFitScreen, true ); }