Browse Source

When using git, show all files

Git tracks the status of files in the repository, so we shouldn't hide
the non-root schematics

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

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21583
master
Seth Hillbrand 3 weeks ago
parent
commit
d5e03741b7
  1. 6
      kicad/project_tree_pane.cpp

6
kicad/project_tree_pane.cpp

@ -478,6 +478,7 @@ wxTreeItemId PROJECT_TREE_PANE::addItemToProjectTree( const wxString& aName,
wxString file = wxFileNameFromPath( aName );
wxFileName currfile( file );
wxFileName project( m_Parent->GetProjectFileName() );
bool showAllSchematics = m_TreeProject->GetGitRepo() != nullptr;
// Ignore legacy projects with the same name as the current project
if( ( type == TREE_FILE_TYPE::LEGACY_PROJECT )
@ -486,8 +487,9 @@ wxTreeItemId PROJECT_TREE_PANE::addItemToProjectTree( const wxString& aName,
return wxTreeItemId();
}
if( currfile.GetExt() == GetFileExt( TREE_FILE_TYPE::LEGACY_SCHEMATIC )
|| currfile.GetExt() == GetFileExt( TREE_FILE_TYPE::SEXPR_SCHEMATIC ) )
if( !showAllSchematics
&& ( currfile.GetExt() == GetFileExt( TREE_FILE_TYPE::LEGACY_SCHEMATIC )
|| currfile.GetExt() == GetFileExt( TREE_FILE_TYPE::SEXPR_SCHEMATIC ) ) )
{
if( aProjectNames )
{

Loading…
Cancel
Save