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

Commit de7dade

Browse files
Disable delete button if the selected item is a folder
1 parent 5ac4b7a commit de7dade

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ private void OnButtonBarGUI()
464464
{
465465
// Delete button
466466
// If the current branch is selected, then do not enable the Delete button
467-
var disableDelete = selectedNode == null || activeBranchNode == selectedNode;
467+
var disableDelete = selectedNode == null || selectedNode.Type == NodeType.Folder || activeBranchNode == selectedNode;
468468
EditorGUI.BeginDisabledGroup(disableDelete);
469469
{
470470
if (GUILayout.Button(DeleteBranchButton, EditorStyles.miniButton, GUILayout.ExpandWidth(false)))

0 commit comments

Comments
 (0)