Merge pull request #335 from gadfly3173/fix/open-local-repo

fix: do NOT change parent of RepositoryNode if it exists when open it from FolderPicker
This commit is contained in:
leo 2024-08-08 10:43:59 +08:00 committed by GitHub
commit 3866b2513b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -55,7 +55,7 @@ namespace SourceGit.Views
} }
var normalizedPath = root.Replace("\\", "/"); var normalizedPath = root.Replace("\\", "/");
var node = ViewModels.Preference.Instance.FindOrAddNodeByRepositoryPath(normalizedPath, parent, true); var node = ViewModels.Preference.Instance.FindOrAddNodeByRepositoryPath(normalizedPath, parent, false);
var launcher = this.FindAncestorOfType<Launcher>()?.DataContext as ViewModels.Launcher; var launcher = this.FindAncestorOfType<Launcher>()?.DataContext as ViewModels.Launcher;
launcher?.OpenRepositoryInTab(node, launcher.ActivePage); launcher?.OpenRepositoryInTab(node, launcher.ActivePage);
} }