mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-24 10:50:52 +08:00
optimize<CommitGraph>: remove unused code
This commit is contained in:
@@ -140,11 +140,6 @@ namespace SourceGit.Helpers {
|
||||
/// </summary>
|
||||
public List<Dot> Dots { get; set; } = new List<Dot>();
|
||||
|
||||
/// <summary>
|
||||
/// Highlight commit id.
|
||||
/// </summary>
|
||||
public string Highlight { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Parse commits.
|
||||
/// </summary>
|
||||
@@ -168,11 +163,6 @@ namespace SourceGit.Helpers {
|
||||
// 更新Y坐标
|
||||
offsetY += UNIT_HEIGHT;
|
||||
|
||||
// 找到当前的分支的HEAD,用于默认选中
|
||||
if (maker.Highlight == null && commit.IsHEAD) {
|
||||
maker.Highlight = commit.SHA;
|
||||
}
|
||||
|
||||
// 找到第一个依赖于本提交的树,将其他依赖于本提交的树标记为终止,并对已存在的线路调整(防止线重合)
|
||||
double offsetX = -HALF_WIDTH;
|
||||
foreach (var l in unsolved) {
|
||||
@@ -268,11 +258,6 @@ namespace SourceGit.Helpers {
|
||||
}
|
||||
unsolved.Clear();
|
||||
|
||||
// 处理默认选中异常
|
||||
if (maker.Highlight == null && commits.Count > 0) {
|
||||
maker.Highlight = commits[0].SHA;
|
||||
}
|
||||
|
||||
return maker;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -169,7 +169,6 @@ namespace SourceGit.UI {
|
||||
maker.Dots.Clear();
|
||||
|
||||
commitList.ItemsSource = new List<Git.Commit>(cachedCommits);
|
||||
// Navigate(maker.Highlight);
|
||||
SetLoadingEnabled(false);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user