Skip to content

Commit 71be83e

Browse files
committed
asdasd
1 parent 3fc8ab6 commit 71be83e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Assets/Editor/GitPanelWindow.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff 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)

0 commit comments

Comments
 (0)