Be careful with legacy ".pro" conversions.

This commit is contained in:
Jeff Young 2025-07-03 17:27:49 -06:00
parent 4d06fbce1a
commit 762fd179d3

View File

@ -809,12 +809,15 @@ void KICAD_MANAGER_FRAME::LoadProject( const wxFileName& aProjectFileName )
m_active_project = true; m_active_project = true;
Pgm().GetSettingsManager().LoadProject( aProjectFileName.GetFullPath() ); // NB: when loading a legacy project SETTINGS_MANAGER::LoadProject() will convert it to
// current extension. Be very careful with aProjectFileName vs. Prj().GetProjectPath()
// from here on out.
Pgm().GetSettingsManager().LoadProject( aProjectFileName.GetFullPath() );
LoadWindowState( aProjectFileName.GetFullName() ); LoadWindowState( aProjectFileName.GetFullName() );
if( aProjectFileName.IsDirWritable() ) if( aProjectFileName.IsDirWritable() )
SetMruPath( Prj().GetProjectPath() ); // Only set MRU path if we have write access. Why? SetMruPath( Prj().GetProjectPath() );
// Save history & window state to disk now. Don't wait around for a crash. // Save history & window state to disk now. Don't wait around for a crash.
KICAD_SETTINGS* settings = kicadSettings(); KICAD_SETTINGS* settings = kicadSettings();