From 9809ad846c7e2b6a731f7c532600ec7b2b530492 Mon Sep 17 00:00:00 2001 From: "Johnny C. Lam" Date: Fri, 18 Jul 2014 14:51:27 -0400 Subject: [PATCH] Manipulate the Ovale trace/bug flags more accurately. Add a new method ResetTrace() that resets the trace/bug state and is called prior to a script being compiled. Rename the PostRefresh() method to "UpdateTrace" to more accurately reflect its actions. --- Ovale.lua | 8 +++++++- OvaleCompile.lua | 2 ++ OvaleFrame.lua | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Ovale.lua b/Ovale.lua index dad6c31..b0ce159 100644 --- a/Ovale.lua +++ b/Ovale.lua @@ -284,7 +284,13 @@ function Ovale:UpdateFrame() self:UpdateVisibility() end -function Ovale:PostRefresh() +function Ovale:ResetTrace() + self.trace = false + self_traced = false + self_bug = false +end + +function Ovale:UpdateTrace() -- If trace flag is set here, then flag that we just traced one frame. if self.trace then self_traced = true diff --git a/OvaleCompile.lua b/OvaleCompile.lua index 19844dd..ad9a4be 100644 --- a/OvaleCompile.lua +++ b/OvaleCompile.lua @@ -461,6 +461,8 @@ function OvaleCompile:EventHandler(event) end function OvaleCompile:CompileScript(event) + -- Reset the trace state if we compile a new script. + Ovale:ResetTrace() -- Compile the selected script from the profile. local profile = OvaleOptions:GetProfile() local source = profile.source diff --git a/OvaleFrame.lua b/OvaleFrame.lua index f49dc05..adcc00d 100644 --- a/OvaleFrame.lua +++ b/OvaleFrame.lua @@ -282,7 +282,7 @@ do end wipe(Ovale.refreshNeeded) - Ovale:PostRefresh() + Ovale:UpdateTrace() Ovale:PrintOneTimeMessages() end -- 1.7.9.5