optimize<CommitGraph>: remove unused code

This commit is contained in:
leo 2020-11-03 11:45:46 +08:00
parent dbf5ffe01b
commit 5e6ef8abcb
2 changed files with 0 additions and 16 deletions

View file

@ -140,11 +140,6 @@ namespace SourceGit.Helpers {
/// </summary> /// </summary>
public List<Dot> Dots { get; set; } = new List<Dot>(); public List<Dot> Dots { get; set; } = new List<Dot>();
/// <summary>
/// Highlight commit id.
/// </summary>
public string Highlight { get; set; }
/// <summary> /// <summary>
/// Parse commits. /// Parse commits.
/// </summary> /// </summary>
@ -168,11 +163,6 @@ namespace SourceGit.Helpers {
// 更新Y坐标 // 更新Y坐标
offsetY += UNIT_HEIGHT; offsetY += UNIT_HEIGHT;
// 找到当前的分支的HEAD用于默认选中
if (maker.Highlight == null && commit.IsHEAD) {
maker.Highlight = commit.SHA;
}
// 找到第一个依赖于本提交的树,将其他依赖于本提交的树标记为终止,并对已存在的线路调整(防止线重合) // 找到第一个依赖于本提交的树,将其他依赖于本提交的树标记为终止,并对已存在的线路调整(防止线重合)
double offsetX = -HALF_WIDTH; double offsetX = -HALF_WIDTH;
foreach (var l in unsolved) { foreach (var l in unsolved) {
@ -268,11 +258,6 @@ namespace SourceGit.Helpers {
} }
unsolved.Clear(); unsolved.Clear();
// 处理默认选中异常
if (maker.Highlight == null && commits.Count > 0) {
maker.Highlight = commits[0].SHA;
}
return maker; return maker;
} }
} }

View file

@ -169,7 +169,6 @@ namespace SourceGit.UI {
maker.Dots.Clear(); maker.Dots.Clear();
commitList.ItemsSource = new List<Git.Commit>(cachedCommits); commitList.ItemsSource = new List<Git.Commit>(cachedCommits);
// Navigate(maker.Highlight);
SetLoadingEnabled(false); SetLoadingEnabled(false);
}); });
} }