From 3616e1f813d96ad3eab8030b877107c4c0fffb8f Mon Sep 17 00:00:00 2001 From: michaelsp Date: Fri, 11 Dec 2020 23:19:50 +0100 Subject: [PATCH] Fixing Ticket #910 (Profile spec switch did not work with blizzard automatic spec change in LFG). --- GridRoster.lua | 5 ++++- Options/GridIndicators.lua | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/GridRoster.lua b/GridRoster.lua index 4ed39cf2..7a229830 100644 --- a/GridRoster.lua +++ b/GridRoster.lua @@ -182,8 +182,11 @@ do end end -- needed to trigger an update when switching from one BG directly to another - function Grid2:PLAYER_ENTERING_WORLD() + function Grid2:PLAYER_ENTERING_WORLD(_, isLogin, isReloadUI) groupType, updateCount = nil, 0 + if not (isLogin or isReloadUI) then + self:ReloadProfile() -- to detect blizzard silent spec change when entering in a LFG instance + end self:GroupChanged('PLAYER_ENTERING_WORLD') end -- partyTypes = solo party arena raid / instTypes = none pvp lfr flex mythic other diff --git a/Options/GridIndicators.lua b/Options/GridIndicators.lua index 8701d0ba..4867f74b 100644 --- a/Options/GridIndicators.lua +++ b/Options/GridIndicators.lua @@ -16,7 +16,7 @@ Grid2Options.indicatorTypesOrder= { tooltip = 1, alpha = 2, background = 3, bord Grid2Options.indicatorTitleIconsOptions = { size = 24, offsetx = -4, offsety = -2, anchor = 'TOPRIGHT', - { image = "Interface\\AddOns\\Grid2Options\\media\\delete", tooltip = L["Delete this indicator"], func = function(info) Grid2Options:DeleteIndicator( info.option.arg.indicator ) end }, + { image = "Interface\\AddOns\\Grid2Options\\media\\delete", tooltip = L["Delete this indicator"], func = function(info) Grid2Options:DeleteIndicatorConfirm( info.option.arg.indicator ) end }, } do @@ -73,7 +73,7 @@ do end -- Published because is used outside indicators management panel too - function Grid2Options:DeleteIndicator(indicator) + function Grid2Options:DeleteIndicatorConfirm(indicator) if self:IndicatorIsInUse(indicator) then self:MessageDialog( L["This indicator cannot be deleted because is in use. Uncheck the statuses linked to the indicator first."] ) else @@ -191,7 +191,7 @@ do end local function DeleteIndicator(info, name) - Grid2Options:DeleteIndicator( Grid2.indicators[name] ) + Grid2Options:DeleteIndicatorConfirm( Grid2.indicators[name] ) end -- function ToggleTestMode()