From c2f5941435553c9c11fe99a96b6be0d8bf4598e0 Mon Sep 17 00:00:00 2001 From: goaaats Date: Sat, 29 Jan 2022 00:30:07 +0100 Subject: [PATCH] fix(ContextMenu): stop processing events when test is over --- .../Windows/SelfTest/AgingSteps/ContextMenuAgingStep.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/ContextMenuAgingStep.cs b/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/ContextMenuAgingStep.cs index 3af1834b2..675b21087 100644 --- a/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/ContextMenuAgingStep.cs +++ b/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/ContextMenuAgingStep.cs @@ -35,6 +35,7 @@ namespace Dalamud.Interface.Internal.Windows.SelfTest.AgingSteps TestGameObject, TestSubMenu, TestMultiple, + Finish, } /// @@ -118,7 +119,10 @@ namespace Dalamud.Interface.Internal.Windows.SelfTest.AgingSteps case SubStep.TestMultiple: if (this.multipleTriggerOne && this.multipleTriggerTwo) + { + this.currentSubStep = SubStep.Finish; return SelfTestStepResult.Pass; + } ImGui.Text("Select both options on any context menu."); if (ImGui.Button("Skip")) @@ -139,6 +143,8 @@ namespace Dalamud.Interface.Internal.Windows.SelfTest.AgingSteps this.currentSubStep = SubStep.Start; this.clickedItemId = 0; + this.clickedPlayerName = null; + this.multipleTriggerOne = this.multipleTriggerTwo = false; } private void ContextMenuOnContextMenuOpened(ContextMenuOpenedArgs args) @@ -174,6 +180,9 @@ namespace Dalamud.Interface.Internal.Windows.SelfTest.AgingSteps })); return; + case SubStep.Finish: + return; + default: switch (args.ParentAddonName) {