Use actual project path when saving project
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10540
This commit is contained in:
parent
012a9bb7cb
commit
9c386026a8
|
@ -387,6 +387,7 @@ wxString SETTINGS_MANAGER::GetPathForSettingsFile( JSON_SETTINGS* aSettings )
|
||||||
return GetUserSettingsPath();
|
return GetUserSettingsPath();
|
||||||
|
|
||||||
case SETTINGS_LOC::PROJECT:
|
case SETTINGS_LOC::PROJECT:
|
||||||
|
// TODO: MDI support
|
||||||
return Prj().GetProjectPath();
|
return Prj().GetProjectPath();
|
||||||
|
|
||||||
case SETTINGS_LOC::COLORS:
|
case SETTINGS_LOC::COLORS:
|
||||||
|
@ -972,7 +973,7 @@ bool SETTINGS_MANAGER::SaveProject( const wxString& aFullPath, PROJECT* aProject
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
PROJECT_FILE* project = m_project_files.at( path );
|
PROJECT_FILE* project = m_project_files.at( path );
|
||||||
wxString projectPath = GetPathForSettingsFile( project );
|
wxString projectPath = aProject->GetProjectPath();
|
||||||
|
|
||||||
project->SaveToFile( projectPath );
|
project->SaveToFile( projectPath );
|
||||||
aProject->GetLocalSettings().SaveToFile( projectPath );
|
aProject->GetLocalSettings().SaveToFile( projectPath );
|
||||||
|
|
Loading…
Reference in New Issue