From d5e03741b716fa6f1784fa6984c490d7af63e369 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Fri, 19 Sep 2025 11:21:09 -0700 Subject: [PATCH] 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 --- kicad/project_tree_pane.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kicad/project_tree_pane.cpp b/kicad/project_tree_pane.cpp index 80e708104c..b4a58274d5 100644 --- a/kicad/project_tree_pane.cpp +++ b/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 ) {