File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -430,6 +430,7 @@ private void OnGUI()
430430 GUILayout . Label ( "Commit Message" , EditorStyles . boldLabel ) ;
431431 commitMessage = GUILayout . TextField ( commitMessage ) ;
432432 GUILayout . BeginHorizontal ( ) ;
433+ EditorGUI . BeginDisabledGroup ( ! SceneManager . GetActiveScene ( ) . isDirty && fileChanges . Count == 0 ) ;
433434 if ( GUILayout . Button ( "✓ Commit" , GUILayout . Height ( 25 ) ) )
434435 {
435436 if ( ! string . IsNullOrWhiteSpace ( commitMessage ) )
@@ -442,6 +443,7 @@ private void OnGUI()
442443 UnityEngine . Debug . LogWarning ( "⚠️ Commit message cannot be empty." ) ;
443444 }
444445 }
446+ EditorGUI . EndDisabledGroup ( ) ;
445447 EditorGUI . BeginDisabledGroup ( ! localHasChanges ) ;
446448 if ( GUILayout . Button ( "↑ Push " , GUILayout . Height ( 25 ) , GUILayout . Width ( position . width * 0.25f ) ) )
447449 {
@@ -464,7 +466,7 @@ private void OnGUI()
464466 try
465467 {
466468 RunGitCommand ( "pull" ) ;
467- UnityEditor . SceneManagement . EditorSceneManager . OpenScene ( UnityEngine . SceneManagement . SceneManager . GetActiveScene ( ) . path ) ;
469+ EditorSceneManager . OpenScene ( SceneManager . GetActiveScene ( ) . path ) ;
468470 UnityEngine . Debug . Log ( "✅ Pull successful." ) ;
469471 }
470472 catch ( System . Exception e )
You can’t perform that action at this time.
0 commit comments