Don't write local settings of imported project into current settings.
Fixes https://gitlab.com/kicad/code/kicad/issues/6552
This commit is contained in:
parent
56fa5a23c3
commit
de9d1eb93e
|
@ -748,12 +748,14 @@ bool SETTINGS_MANAGER::LoadProject( const wxString& aFullPath, bool aSetActive )
|
||||||
|
|
||||||
wxString fn( path.GetName() );
|
wxString fn( path.GetName() );
|
||||||
|
|
||||||
PROJECT_LOCAL_SETTINGS* settings = static_cast<PROJECT_LOCAL_SETTINGS*>(
|
PROJECT_LOCAL_SETTINGS* settings = new PROJECT_LOCAL_SETTINGS( m_projects[fullPath], fn );
|
||||||
RegisterSettings( new PROJECT_LOCAL_SETTINGS( m_projects[fullPath], fn ) ) );
|
|
||||||
|
if( aSetActive )
|
||||||
|
settings = static_cast<PROJECT_LOCAL_SETTINGS*>( RegisterSettings( settings ) );
|
||||||
|
|
||||||
m_projects[fullPath]->setLocalSettings( settings );
|
m_projects[fullPath]->setLocalSettings( settings );
|
||||||
|
|
||||||
if( m_kiway )
|
if( aSetActive && m_kiway )
|
||||||
m_kiway->ProjectChanged();
|
m_kiway->ProjectChanged();
|
||||||
|
|
||||||
return success;
|
return success;
|
||||||
|
@ -884,8 +886,8 @@ bool SETTINGS_MANAGER::loadProjectFile( PROJECT& aProject )
|
||||||
wxFileName fullFn( aProject.GetProjectFullName() );
|
wxFileName fullFn( aProject.GetProjectFullName() );
|
||||||
wxString fn( fullFn.GetName() );
|
wxString fn( fullFn.GetName() );
|
||||||
|
|
||||||
PROJECT_FILE* file =
|
PROJECT_FILE* file = static_cast<PROJECT_FILE*>( RegisterSettings( new PROJECT_FILE( fn ),
|
||||||
static_cast<PROJECT_FILE*>( RegisterSettings( new PROJECT_FILE( fn ), false ) );
|
false ) );
|
||||||
|
|
||||||
m_project_files[aProject.GetProjectFullName()] = file;
|
m_project_files[aProject.GetProjectFullName()] = file;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue