Skip to content

Commit

Permalink
Bug window reset updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Wutname1 committed Nov 2, 2024
1 parent 54f62b7 commit c19f8a7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
18 changes: 9 additions & 9 deletions Core/Handlers/Bugs/BugWindow.lua
Original file line number Diff line number Diff line change
Expand Up @@ -238,15 +238,8 @@ function addon.BugWindow.Create()
clearAllBtn:SetPoint('BOTTOMRIGHT', search, 'TOPRIGHT', 0, 5)
clearAllBtn:SetScript('OnClick', function()
BugGrabber:Reset()
-- Reset the UI
currentErrorList = {}
currentErrorIndex = nil
updateDisplay(true)

-- Reset the MiniMap Icon
if addon.MiniMapIcon then
addon.MiniMapIcon:Reset() -- Assuming there's a Reset method for the MiniMap Icon
end
addon.BugWindow.ResetUI()
addon:updatemapIcon()
end)
window.Buttons.ClearAll = clearAllBtn

Expand Down Expand Up @@ -304,3 +297,10 @@ end
function addon.BugWindow:IsShown()
return window and window:IsShown()
end

addon.BugWindow.ResetUI = function()
-- Reset the UI
currentErrorList = {}
currentErrorIndex = nil
updateDisplay(true)
end
2 changes: 2 additions & 0 deletions Core/Handlers/Bugs/Main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ local function InitializeMinimapButton()
OnClick = function(self, button)
if IsAltKeyDown() then
BugGrabber:Reset()
addon.BugWindow.ResetUI()
addon:updatemapIcon()
elseif button == 'RightButton' then
Settings.OpenToCategory(addon.settingsCategory.ID)
else
Expand Down

0 comments on commit c19f8a7

Please sign in to comment.