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

Commit 69fd053

Browse files
Clearing onClose and Raising it before opening a window
1 parent ab20b12 commit 69fd053

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,13 @@ public virtual void Finish(bool result)
5252
{
5353
finishCalled = true;
5454
RaiseOnClose(result);
55+
OnClose = null;
5556
}
5657

5758
protected void RaiseOnClose(bool result)
5859
{
5960
OnClose.SafeInvoke(result);
61+
OnClose = null;
6062
}
6163

6264
public virtual void Awake()

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ public static void Launch()
2929
public static PopupWindow Open(PopupViewType popupViewType, Action<bool> onClose = null)
3030
{
3131
var popupWindow = GetWindow<PopupWindow>(true);
32+
33+
popupWindow.RaiseOnClose(false);
34+
3235
if (onClose != null)
3336
{
3437
popupWindow.OnClose += onClose;

0 commit comments

Comments
 (0)