From 3eb1b5e623cf94dc5dd527d5b5211e8d68bc6930 Mon Sep 17 00:00:00 2001 From: Stanley Goldman Date: Mon, 25 Feb 2019 10:52:51 -0500 Subject: [PATCH 1/2] Calling AssetDatabase.Refresh after discard --- .../Assets/Editor/GitHub.Unity/UI/ChangesView.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/UnityExtension/Assets/Editor/GitHub.Unity/UI/ChangesView.cs b/src/UnityExtension/Assets/Editor/GitHub.Unity/UI/ChangesView.cs index ec0de8717..4b2ee2749 100644 --- a/src/UnityExtension/Assets/Editor/GitHub.Unity/UI/ChangesView.cs +++ b/src/UnityExtension/Assets/Editor/GitHub.Unity/UI/ChangesView.cs @@ -244,6 +244,9 @@ private GenericMenu CreateContextMenu(ChangesTreeNode node) } Repository.DiscardChanges(discardEntries) + .ThenInUI(() => { + AssetDatabase.Refresh(); + }) .Start(); }); From 00e7c4f1c91faacdb231c1d52ecaaee1d1236870 Mon Sep 17 00:00:00 2001 From: Stanley Goldman Date: Mon, 25 Feb 2019 11:59:05 -0500 Subject: [PATCH 2/2] Calling AssetDatabase.Refresh in the status changer handler --- .../Assets/Editor/GitHub.Unity/UI/ChangesView.cs | 4 +--- .../Assets/Editor/GitHub.Unity/UI/ProjectWindowInterface.cs | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/UnityExtension/Assets/Editor/GitHub.Unity/UI/ChangesView.cs b/src/UnityExtension/Assets/Editor/GitHub.Unity/UI/ChangesView.cs index 4b2ee2749..d905fb070 100644 --- a/src/UnityExtension/Assets/Editor/GitHub.Unity/UI/ChangesView.cs +++ b/src/UnityExtension/Assets/Editor/GitHub.Unity/UI/ChangesView.cs @@ -244,9 +244,7 @@ private GenericMenu CreateContextMenu(ChangesTreeNode node) } Repository.DiscardChanges(discardEntries) - .ThenInUI(() => { - AssetDatabase.Refresh(); - }) + .ThenInUI(AssetDatabase.Refresh) .Start(); }); diff --git a/src/UnityExtension/Assets/Editor/GitHub.Unity/UI/ProjectWindowInterface.cs b/src/UnityExtension/Assets/Editor/GitHub.Unity/UI/ProjectWindowInterface.cs index 7e1a9adb3..9e9a3547e 100644 --- a/src/UnityExtension/Assets/Editor/GitHub.Unity/UI/ProjectWindowInterface.cs +++ b/src/UnityExtension/Assets/Editor/GitHub.Unity/UI/ProjectWindowInterface.cs @@ -291,7 +291,7 @@ private static void OnStatusUpdate() guids.Add(guid); } - EditorApplication.RepaintProjectWindow(); + AssetDatabase.Refresh(); } private static void OnProjectWindowItemGUI(string guid, Rect itemRect)