void DisplayFile(VCFile file, int index, bool staged, List <VCFile> filteredList) { if (index % 2 == 0) { GUI.backgroundColor = Color.gray; } else { GUI.backgroundColor = Color.white; } GUILayout.BeginHorizontal(); string statusString = file.fileState1 != FileState.Unmodified ? file.fileState1.ToString() : file.fileState2.ToString(); string filePathString = !string.IsNullOrEmpty(file.path2) ? file.path2 : file.path1; bool t1 = GUILayout.Toggle(file.selected, statusString, selectionStyle, GUILayout.Width(75)); bool t2 = false; if (viewMode != BrowserViewMode.ArtistMode) { string fileNameString = !string.IsNullOrEmpty(file.name2) ? file.name2 : file.name1; t2 = GUILayout.Toggle(file.selected, fileNameString, selectionStyle, GUILayout.Width(295)); } bool t3 = GUILayout.Toggle(file.selected, filePathString, selectionStyle, GUILayout.ExpandWidth(true)); GUILayout.EndHorizontal(); GUI.backgroundColor = Color.white; if (viewMode != BrowserViewMode.ArtistMode && t2 != file.selected) { BrowserUtility.ValidateSelection(file, t2, false, index, lastSelectedIndex, filteredList); if (file.selected) { lastSelectedIndex = index; } } else if (t3 != file.selected) { BrowserUtility.ValidateSelection(file, t3, false, index, lastSelectedIndex, filteredList); lastSelectedIndex = file.selected ? index : -1; } else if (t1 != file.selected) { BrowserUtility.ValidateSelection(file, t1, false, index, lastSelectedIndex, filteredList); lastSelectedIndex = file.selected ? index : -1; } }