From da28ade00430656a4475e741725c2640ed3519f0 Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Sun, 16 Jan 2022 09:47:08 -0500 Subject: [PATCH] Footprint editor: use most recently used path on footprint import. Fixes https://gitlab.com/kicad/code/kicad/-/issues/10418 (cherry picked from commit c154e85ebdc8bb435527be1598ed4f4d1772b5d8) --- pcbnew/footprint_libraries_utils.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pcbnew/footprint_libraries_utils.cpp b/pcbnew/footprint_libraries_utils.cpp index 576c3e26f5..3f8da55722 100644 --- a/pcbnew/footprint_libraries_utils.cpp +++ b/pcbnew/footprint_libraries_utils.cpp @@ -1,7 +1,7 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -101,7 +101,7 @@ static wxFileName getFootprintFilenameFromUser( wxWindow* aParent, const wxStrin * Read a file to detect the type. * @param aFile - open file to be read. File pointer will be closed. * @param aFileName - file name to be read - * @param aName - wxString to receive the footprint name iff type is LEGACY + * @param aName - wxString to receive the footprint name if type is LEGACY */ static IO_MGR::PCB_FILE_T detect_file_type( FILE* aFile, const wxFileName& aFileName, wxString* aName ) @@ -257,7 +257,7 @@ FOOTPRINT* FOOTPRINT_EDIT_FRAME::ImportFootprint( const wxString& aName ) return nullptr; } - cfg->m_LastImportExportPath = lastOpenedPathForLoading; + m_mruPath = cfg->m_LastImportExportPath = fn.GetPath(); wxString footprintName; IO_MGR::PCB_FILE_T fileType = detect_file_type( fp, fn.GetFullPath(), &footprintName );