@@ -26,7 +26,7 @@ class ProjectWindowInterface : AssetPostprocessor
26
26
private static CacheUpdateEvent lastRepositoryStatusChangedEvent ;
27
27
private static CacheUpdateEvent lastLocksChangedEvent ;
28
28
private static IRepository Repository { get { return manager != null ? manager . Environment . Repository : null ; } }
29
- private static bool IsInitialized { get { return Repository != null && Repository . CurrentRemote . HasValue ; } }
29
+ private static bool IsInitialized { get { return Repository != null ; } }
30
30
31
31
public static void Initialize ( IApplicationManager theManager )
32
32
{
@@ -67,6 +67,7 @@ private static void RepositoryOnStatusEntriesChanged(CacheUpdateEvent cacheUpdat
67
67
if ( ! lastRepositoryStatusChangedEvent . Equals ( cacheUpdateEvent ) )
68
68
{
69
69
lastRepositoryStatusChangedEvent = cacheUpdateEvent ;
70
+ AssetDatabase . Refresh ( ) ;
70
71
entries . Clear ( ) ;
71
72
entries . AddRange ( Repository . CurrentChanges ) ;
72
73
OnStatusUpdate ( ) ;
@@ -88,6 +89,8 @@ private static bool ContextMenu_CanLock()
88
89
{
89
90
if ( ! EnsureInitialized ( ) )
90
91
return false ;
92
+ if ( ! Repository . CurrentRemote . HasValue )
93
+ return false ;
91
94
if ( isBusy )
92
95
return false ;
93
96
return Selection . objects . Any ( IsObjectUnlocked ) ;
@@ -98,6 +101,8 @@ private static bool ContextMenu_CanUnlock()
98
101
{
99
102
if ( ! EnsureInitialized ( ) )
100
103
return false ;
104
+ if ( ! Repository . CurrentRemote . HasValue )
105
+ return false ;
101
106
if ( isBusy )
102
107
return false ;
103
108
return Selection . objects . Any ( IsObjectLocked ) ;
@@ -108,6 +113,8 @@ private static bool ContextMenu_CanUnlockForce()
108
113
{
109
114
if ( ! EnsureInitialized ( ) )
110
115
return false ;
116
+ if ( ! Repository . CurrentRemote . HasValue )
117
+ return false ;
111
118
if ( isBusy )
112
119
return false ;
113
120
return Selection . objects . Any ( IsObjectLocked ) ;
0 commit comments