From b44660f73c98729c32441bec770d283bf2dab2e1 Mon Sep 17 00:00:00 2001 From: Alar of Daggerspine Date: Thu, 21 Jan 2016 23:23:34 +0100 Subject: [PATCH] Safe autologout --- MissionCompletion.lua | 8 ++++---- MissionControl.lua | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/MissionCompletion.lua b/MissionCompletion.lua index fdc0932..509a99b 100644 --- a/MissionCompletion.lua +++ b/MissionCompletion.lua @@ -151,18 +151,18 @@ function module:MissionComplete(this,button,skiprescheck) end end if stop and not skiprescheck then - local wasquick=ns.quick - ns.quick=false self:Popup(message.."\n" ..format(L["If you %s, you will loose them\nClick on %s to abort"],ACCEPT,CANCEL),0, function() - ns.quick=wasquick + StaticPopup_Hide("LIBINIT_POPUP") module:MissionComplete(this,button,true) - if ns.quick then addon:RunQuick() end end, function() + StaticPopup_Hide("LIBINIT_POPUP") this:SetEnabled(true) missionsFrame.CompleteDialog.BorderFrame.ViewButton:SetEnabled(true) panel:Hide() + ns.quick=false + end ) return diff --git a/MissionControl.lua b/MissionControl.lua index dc20659..a55aa0c 100644 --- a/MissionControl.lua +++ b/MissionControl.lua @@ -267,8 +267,8 @@ function module:GMC_OnClick_Run(this,button) if (not rc) then self:Unhook(GMC.runButton,'OnUpdate') GMC.logoutButton:Enable() + ns.quick=false if addon:GetBoolean("AUTOLOGOUT") then - ns.quick=false addon:ScheduleTimer(function() GMC.logoutButton:Click() end,0.5) end end -- 1.7.9.5