Skip to content
Snippets Groups Projects
Commit 1b6f0a33 authored by Emil "AngryAnt" Johansen's avatar Emil "AngryAnt" Johansen
Browse files

Double-click remote branch to create a new local branch tracking it. Only...

Double-click remote branch to create a new local branch tracking it. Only allow this as well as switching when in default mode.
parent 1989dfa2
No related branches found
No related tags found
No related merge requests found
......@@ -543,14 +543,21 @@ namespace GitHub.Unity
newNodeSelection = node;
Event.current.Use();
if (Event.current.clickCount > 1 && node.Type == NodeType.LocalBranch && EditorUtility.DisplayDialog(
ConfirmSwitchTitle,
string.Format(ConfirmSwitchMessage, node.Name),
ConfirmSwitchOK,
ConfirmSwitchCancel
))
if (Event.current.clickCount > 1 && mode == BranchesMode.Default)
{
GitSwitchBranchesTask.Schedule(node.Name, Refresh);
if (node.Type == NodeType.LocalBranch && EditorUtility.DisplayDialog(
ConfirmSwitchTitle,
string.Format(ConfirmSwitchMessage, node.Name),
ConfirmSwitchOK,
ConfirmSwitchCancel
))
{
GitSwitchBranchesTask.Schedule(node.Name, Refresh);
}
else if (node.Type == NodeType.RemoteBranch)
{
GitBranchCreateTask.Schedule(selectedNode.Name.Substring(selectedNode.Name.IndexOf('/') + 1), selectedNode.Name, Refresh);
}
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment