From a8abfe31a580070b4934f36deda718a98d2ccfe3 Mon Sep 17 00:00:00 2001 From: Lothrik Date: Thu, 28 Mar 2024 18:25:00 -0700 Subject: [PATCH 1/2] Fix settings save/load regression --- src/Modules/Main.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Modules/Main.lua b/src/Modules/Main.lua index 39385efabc..5b0a7b108e 100644 --- a/src/Modules/Main.lua +++ b/src/Modules/Main.lua @@ -87,6 +87,8 @@ function main:Init() end if self.userPath then self:ChangeUserPath(self.userPath, ignoreBuild) + else + self:LoadSettings(ignoreBuild) end if launch.devMode and IsKeyDown("CTRL") then @@ -769,6 +771,8 @@ function main:OpenOptionsPopup() local currentY = 20 local popupWidth = 600 + self:LoadSettings(true) + -- local func to make a new line with a heightModifier local function nextRow(heightModifier) local pxPerLine = 26 From 42e7ff49c8754606f93215b825fd816371df58fc Mon Sep 17 00:00:00 2001 From: Lothrik Date: Thu, 28 Mar 2024 20:05:51 -0700 Subject: [PATCH 2/2] Fix settings bug properly this time. --- src/Modules/Main.lua | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/src/Modules/Main.lua b/src/Modules/Main.lua index 5b0a7b108e..d143435040 100644 --- a/src/Modules/Main.lua +++ b/src/Modules/Main.lua @@ -85,10 +85,24 @@ function main:Init() self.userPath = self.userPath.."/Path of Building/" end end + + self.buildSortMode = "NAME" + self.connectionProtocol = 0 + self.nodePowerTheme = "RED/BLUE" + self.colorPositive = defaultColorCodes.POSITIVE + self.colorNegative = defaultColorCodes.NEGATIVE + self.colorHighlight = defaultColorCodes.HIGHLIGHT + self.showThousandsSeparators = true + self.thousandsSeparator = "," + self.decimalSeparator = "." + self.defaultItemAffixQuality = 0.5 + self.showTitlebarName = true + self.showWarnings = true + self.slotOnlyTooltips = true + self.POESESSID = "" + if self.userPath then self:ChangeUserPath(self.userPath, ignoreBuild) - else - self:LoadSettings(ignoreBuild) end if launch.devMode and IsKeyDown("CTRL") then @@ -104,25 +118,9 @@ function main:Init() self.allowTreeDownload = true end - self.inputEvents = { } self.tooltipLines = { } - self.buildSortMode = "NAME" - self.connectionProtocol = 0 - self.nodePowerTheme = "RED/BLUE" - self.colorPositive = defaultColorCodes.POSITIVE - self.colorNegative = defaultColorCodes.NEGATIVE - self.colorHighlight = defaultColorCodes.HIGHLIGHT - self.showThousandsSeparators = true - self.thousandsSeparator = "," - self.decimalSeparator = "." - self.defaultItemAffixQuality = 0.5 - self.showTitlebarName = true - self.showWarnings = true - self.slotOnlyTooltips = true - self.POESESSID = "" - self.tree = { } self:LoadTree(latestTreeVersion) @@ -771,8 +769,6 @@ function main:OpenOptionsPopup() local currentY = 20 local popupWidth = 600 - self:LoadSettings(true) - -- local func to make a new line with a heightModifier local function nextRow(heightModifier) local pxPerLine = 26