Skip to content

Commit

Permalink
Prevent Position from moving quest tracker if it is not enabled
Browse files Browse the repository at this point in the history
Ravendwyr#36

Should be able to disable quest tracker to prevent this behavior
  • Loading branch information
stoglim committed Oct 19, 2020
1 parent 8b0c611 commit d3b3555
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Modules/Position.lua
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,9 @@ function Position:OnEnable()

-- in alphabetical order, as they should be
self:SetFramePosition('durability')
self:SetFramePosition('questWatch')
if((Chinchilla:GetModule("QuestTracker", true) and Chinchilla:GetModule("QuestTracker"):IsEnabled())) then
self:SetFramePosition('questWatch')
end
self:SetFramePosition('ticketStatus')

if not Chinchilla:IsClassic() then
Expand Down Expand Up @@ -196,7 +198,9 @@ function Position:OnDisable()

-- in alphabetical order, as they should be
self:SetFramePosition('durability')
self:SetFramePosition('questWatch')
if((Chinchilla:GetModule("QuestTracker", true) and Chinchilla:GetModule("QuestTracker"):IsEnabled())) then
self:SetFramePosition('questWatch')
end
self:SetFramePosition('ticketStatus')

if not Chinchilla:IsClassic() then
Expand Down Expand Up @@ -726,7 +730,7 @@ function Position:GetOptions()
disabled = InCombatLockdown,
} or nil,
questWatch = nameToFrame["questWatch"] and {
name = L["Quest and achievement tracker"],
name = L["Quest and achievement tracker. Moving this element is disabled if Quest Tracker module is disabled."],
desc = L["Position of the quest/achievement tracker on the screen"],
type = 'group',
inline = true,
Expand All @@ -738,6 +742,7 @@ function Position:GetOptions()
order = 1,
get = movable_get,
set = movable_set,
disabled = not ((Chinchilla:GetModule("QuestTracker", true) and Chinchilla:GetModule("QuestTracker"):IsEnabled()))
},
x = {
name = L["Horizontal position"],
Expand Down

0 comments on commit d3b3555

Please sign in to comment.