Use actual project path when saving project

Fixes https://gitlab.com/kicad/code/kicad/-/issues/10540

(cherry picked from commit 9c386026a8)
This commit is contained in:
Jon Evans 2022-03-10 09:08:20 -05:00
parent a9eb7a0e28
commit 507d7916ee
1 changed files with 2 additions and 1 deletions

View File

@ -387,6 +387,7 @@ wxString SETTINGS_MANAGER::GetPathForSettingsFile( JSON_SETTINGS* aSettings )
return GetUserSettingsPath();
case SETTINGS_LOC::PROJECT:
// TODO: MDI support
return Prj().GetProjectPath();
case SETTINGS_LOC::COLORS:
@ -972,7 +973,7 @@ bool SETTINGS_MANAGER::SaveProject( const wxString& aFullPath, PROJECT* aProject
return false;
PROJECT_FILE* project = m_project_files.at( path );
wxString projectPath = GetPathForSettingsFile( project );
wxString projectPath = aProject->GetProjectPath();
project->SaveToFile( projectPath );
aProject->GetLocalSettings().SaveToFile( projectPath );