fix: do NOT change parent of RepositoryNode if it exists when open it from FolderPicker

This commit is contained in:
Gadfly 2024-08-08 10:34:30 +08:00
parent 6bd0920d71
commit 4c471c6bb9
No known key found for this signature in database

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);
} }