Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit 021f406

Browse files
Merge branch 'enhancements/history-list-view' into enhancements/history-detail-tree-view
2 parents 5c5074a + 6090cd8 commit 021f406

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

src/UnityExtension/Assets/Editor/GitHub.Unity/UI/HistoryView.cs

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ public bool Render(Rect containingRect, Action<GitLogEntry> singleClick = null,
3535
Action<GitLogEntry> doubleClick = null, Action<GitLogEntry> rightClick = null)
3636
{
3737
var requiresRepaint = false;
38-
var rect = Rect.zero;
39-
4038
scroll = GUILayout.BeginScrollView(scroll);
4139
{
4240
controlId = GUIUtility.GetControlID(FocusType.Keyboard);
@@ -54,7 +52,7 @@ public bool Render(Rect containingRect, Action<GitLogEntry> singleClick = null,
5452
var startDisplay = scroll.y;
5553
var endDisplay = scroll.y + containingRect.height;
5654

57-
rect = new Rect(containingRect.x, containingRect.y, containingRect.width, 0);
55+
var rect = new Rect(containingRect.x, containingRect.y, containingRect.width, 0);
5856

5957
for (var index = 0; index < entries.Count; index++)
6058
{
@@ -68,15 +66,15 @@ public bool Render(Rect containingRect, Action<GitLogEntry> singleClick = null,
6866
RenderEntry(entryRect, entry, index);
6967
}
7068

71-
var entryRequiresRepaint = HandleInput(entryRect, entry, index, singleClick, doubleClick, rightClick);
69+
var entryRequiresRepaint =
70+
HandleInput(entryRect, entry, index, singleClick, doubleClick, rightClick);
7271
requiresRepaint = requiresRepaint || entryRequiresRepaint;
7372

7473
rect.y += Styles.HistoryEntryHeight;
7574
}
76-
}
77-
78-
GUILayout.Space(rect.y - containingRect.y);
7975

76+
GUILayout.Space(rect.y - containingRect.y);
77+
}
8078
GUILayout.EndScrollView();
8179

8280
return requiresRepaint;
@@ -304,12 +302,6 @@ public void ScrollTo(int index, float offset = 0f)
304302
}
305303
}
306304

307-
enum LogEntryState
308-
{
309-
Normal,
310-
Local
311-
}
312-
313305
[Serializable]
314306
class HistoryView : Subview
315307
{

0 commit comments

Comments
 (0)