Make sure projects get created for boards migrated from 5.x
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6886
This commit is contained in:
parent
8be213e36f
commit
9ce34102af
|
@ -641,8 +641,7 @@ bool PCB_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, in
|
|||
// standalone and opening a board that has been moved from its project folder.
|
||||
// For converted projects, we don't want to set the read-only flag because we want a project
|
||||
// to be saved for the new file in case things like netclasses got migrated.
|
||||
if( !pro.Exists() && !converted )
|
||||
Prj().SetReadOnly();
|
||||
Prj().SetReadOnly( !pro.Exists() && !converted );
|
||||
}
|
||||
|
||||
// Clear the cache footprint list which may be project specific
|
||||
|
@ -724,6 +723,8 @@ bool PCB_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, in
|
|||
|
||||
if( loadedBoard->m_LegacyDesignSettingsLoaded )
|
||||
{
|
||||
Prj().SetReadOnly( false );
|
||||
|
||||
Prj().GetProjectFile().NetSettings().ResolveNetClassAssignments( true );
|
||||
|
||||
// Before we had a copper edge clearance setting, the edge line widths could be used
|
||||
|
|
|
@ -237,6 +237,6 @@ void PCB_EDIT_FRAME::SaveProjectSettings()
|
|||
* The explicit save action in PCB_EDIT_FRAME::SavePcbFile will call SaveProject directly,
|
||||
* so if the user does choose to save the board, the project file will get created then.
|
||||
*/
|
||||
if( !Prj().IsNullProject() && fn.Exists() )
|
||||
if( !Prj().IsNullProject() && ( fn.Exists() || GetBoard()->m_LegacyDesignSettingsLoaded ) )
|
||||
GetSettingsManager()->SaveProject();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue