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

Commit d4121b2

Browse files
Better controlling when OnClose is cleared
1 parent 7f38f33 commit d4121b2

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,15 @@ public virtual void Finish(bool result)
5252
{
5353
finishCalled = true;
5454
RaiseOnClose(result);
55-
OnClose = null;
5655
}
5756

58-
protected void RaiseOnClose(bool result)
57+
protected virtual void RaiseOnClose(bool result)
5958
{
6059
OnClose.SafeInvoke(result);
60+
}
61+
62+
protected void ClearOnClose()
63+
{
6164
OnClose = null;
6265
}
6366

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,12 @@ public override void Refresh()
8383
ActiveView.Refresh();
8484
}
8585

86+
protected override void RaiseOnClose(bool result)
87+
{
88+
base.RaiseOnClose(result);
89+
ClearOnClose();
90+
}
91+
8692
public override void OnSelectionChange()
8793
{
8894
base.OnSelectionChange();

0 commit comments

Comments
 (0)