Skip to content

Commit

Permalink
8.3.04.2
Browse files Browse the repository at this point in the history
Fixes for old settings and clean installs
  • Loading branch information
LanceDH committed Jun 5, 2020
1 parent 905e7ef commit c8813cd
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 15 deletions.
3 changes: 3 additions & 0 deletions Data.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1040,6 +1040,9 @@ _V["PATCH_NOTES"] = {
,["new"] = {
"Added support for setting profiles, allowing people to have different settings for different characters."
}
,["fixes"] = {
"Fixed content on the full screen map not being constrained to the map area."
}
}
,{["version"] = "8.3.03"
,["minor"] = "2"
Expand Down
1 change: 0 additions & 1 deletion Profiles.lua
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ end

function WQT_Profiles:InitSettings()
WQT.settings = {["general"] = {}, ["list"] = {}, ["pin"] = {}, ["filters"] = {}};

if (not WQT.db.global.profiles[0]) then
ConvertDefaultProfile();
end
Expand Down
4 changes: 2 additions & 2 deletions Settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@
<FontString parentKey="Label" inherits="GameFontNormal" maxLines="1" justifyH="CENTER">
<Size x="120" y="25"/>
<Anchors>
<Anchor point="CENTER" y="1"/>
<Anchor point="CENTER" y="0"/>
</Anchors>
</FontString>
</Layer>
Expand All @@ -276,7 +276,7 @@
</OnMouseDown>
<OnMouseUp inherit="prepend">
if (not self:GetParent():IsDisabled()) then
self.Label:SetPoint("CENTER", self, 0, 1);
self.Label:SetPoint("CENTER", self, 0, 0);
end
</OnMouseUp>
<OnClick>
Expand Down
18 changes: 6 additions & 12 deletions WorldQuestTab.lua
Original file line number Diff line number Diff line change
Expand Up @@ -436,8 +436,7 @@ local function GetNewSettingData(old, default)
end

local function ConvertOldSettings(version)
if (not version) then
WQT.db.global.filters[3].flags.Resources = nil;
if (not version or version == "") then
WQT.db.global.versionCheck = "1";
return;
end
Expand Down Expand Up @@ -488,20 +487,17 @@ local function ConvertOldSettings(version)
local sortBy = WQT.db.global.sortBy;
local updateSeen = WQT.db.global.updateSeen;

for k, v in pairs(WQT.settings) do
if (type(v) ~= "table") then
WQT.settings[k] = nil;
if (WQT.settings) then
for k, v in pairs(WQT.settings) do
if (type(v) ~= "table") then
WQT.settings[k] = nil;
end
end
end

WQT.db.global.versionCheck = version;
WQT.db.global.sortBy = sortBy;
WQT.db.global.updateSeen = updateSeen;

-- New filters
for filterID in pairs(WQT.db.global.filters) do
WQT:SetAllFilterTo(filterID, true);
end
end

if (version < "8.3.01") then
Expand Down Expand Up @@ -838,9 +834,7 @@ end

function WQT:OnInitialize()
self.db = LibStub("AceDB-3.0"):New("BWQDB", _V["WQT_DEFAULTS"], true);

ConvertOldSettings(WQT.db.global.versionCheck)

WQT_Profiles:InitSettings();

-- Hightlight 'what's new'
Expand Down

0 comments on commit c8813cd

Please sign in to comment.