Moved auto zoom outside of the function which loads the gerbers and drill files

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8849
This commit is contained in:
Pradeepa Senanayake 2021-07-24 23:11:11 +10:00 committed by Jeff Young
parent b6e1fe11b6
commit 9b7d056563
2 changed files with 6 additions and 3 deletions

View File

@ -193,7 +193,10 @@ bool GERBVIEW_FRAME::LoadGerberFiles( const wxString& aFullFileName )
// Set the busy cursor
wxBusyCursor wait;
return LoadListOfGerberAndDrillFiles( currentPath, filenamesList );
bool success = LoadListOfGerberAndDrillFiles( currentPath, filenamesList );
Zoom_Automatique( false );
return success;
}
@ -329,8 +332,6 @@ bool GERBVIEW_FRAME::LoadListOfGerberAndDrillFiles( const wxString& aPath,
SetVisibleLayers( visibility );
Zoom_Automatique( false );
// Synchronize layers tools with actual active layer:
ReFillLayerWidget();

View File

@ -227,6 +227,8 @@ bool GERBVIEW_FRAME::LoadGerberJobFile( const wxString& aFullFileName )
wxArrayString& gbrfiles = gbjReader.GetGerberFiles();
success = LoadListOfGerberAndDrillFiles( currentPath, gbrfiles );
Zoom_Automatique( false );
}
}