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

Commit 76c55e2

Browse files
Fixing the enable/disable of context menus
1 parent f82b7ce commit 76c55e2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ private static bool ContextMenu_CanLock()
8989
{
9090
if (!EnsureInitialized())
9191
return false;
92+
if(!Repository.CurrentRemote.HasValue)
93+
return false;
9294
if (isBusy)
9395
return false;
9496
return Selection.objects.Any(IsObjectUnlocked);
@@ -99,6 +101,8 @@ private static bool ContextMenu_CanUnlock()
99101
{
100102
if (!EnsureInitialized())
101103
return false;
104+
if (!Repository.CurrentRemote.HasValue)
105+
return false;
102106
if (isBusy)
103107
return false;
104108
return Selection.objects.Any(IsObjectLocked);
@@ -109,6 +113,8 @@ private static bool ContextMenu_CanUnlockForce()
109113
{
110114
if (!EnsureInitialized())
111115
return false;
116+
if (!Repository.CurrentRemote.HasValue)
117+
return false;
112118
if (isBusy)
113119
return false;
114120
return Selection.objects.Any(IsObjectLocked);

0 commit comments

Comments
 (0)