Skip to content

Commit 4acb65e

Browse files
committed
Fixed #1868 - Lua errors and broken sliders in WoW 9.0.5.
1 parent be71393 commit 4acb65e

File tree

7 files changed

+12
-12
lines changed

7 files changed

+12
-12
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
### Bug Fixes
44
* Fixed an error with the `[Name]` DogTag breaking when LibDogTag-Unit gets upgraded after TMW loads.
55
* Fixed incorrect labels on Text Display editboxes after changing an icon's text layout.
6+
* Fixed #1868 - Lua errors and broken sliders in WoW 9.0.5.
67

78
## v9.0.4
89
* New Condition: Torghast Anima Power Count

Components/Core/Conditions/Categories/Resources.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ ConditionCategory:RegisterCondition(1.1, "HEALTH_ABS", {
6565
text = HEALTH .. " - " .. L["CONDITIONPANEL_ABSOLUTE"],
6666
formatter = TMW.C.Formatter.COMMANUMBER,
6767
min = 0,
68-
range = 1000000,
68+
range = 100000,
6969
icon = "Interface\\Icons\\inv_alchemy_elixir_05",
7070
tcoords = CNDT.COMMON.standardtcoords,
7171
funcstr = [[UnitHealth(c.Unit) c.Operator c.Level]],
@@ -79,7 +79,7 @@ ConditionCategory:RegisterCondition(1.2, "HEALTH_MAX", {
7979
text = HEALTH .. " - " .. L["CONDITIONPANEL_MAX"],
8080
formatter = TMW.C.Formatter.COMMANUMBER,
8181
min = 0,
82-
range = 1000000,
82+
range = 100000,
8383
icon = "Interface\\Icons\\inv_alchemy_elixir_05",
8484
tcoords = CNDT.COMMON.standardtcoords,
8585
funcstr = [[UnitHealthMax(c.Unit) c.Operator c.Level]],

Components/Core/Conditions/Config.lua

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,17 +1021,15 @@ TMW:RegisterCallback("TMW_CNDT_GROUP_DRAWGROUP", function(event, CndtGroup, cond
10211021
-- Don't try and format text while changing parameters because we might get some errors trying
10221022
-- to format unexpected values
10231023
CndtGroup.Slider:SetTextFormatter(nil)
1024-
1025-
CndtGroup.Slider:SetValueStep(step)
1026-
CndtGroup.Slider:SetMinMaxValues(min, max)
1027-
10281024
if range then
10291025
CndtGroup.Slider:SetMode(CndtGroup.Slider.MODE_ADJUSTING)
10301026
CndtGroup.Slider:SetRange(range)
10311027
else
10321028
CndtGroup.Slider:SetMode(CndtGroup.Slider.MODE_STATIC)
10331029
end
10341030

1031+
CndtGroup.Slider:SetValueStep(step)
1032+
CndtGroup.Slider:SetMinMaxValues(min, max)
10351033

10361034
CndtGroup.Slider:SetWidth(522)
10371035
CndtGroup:AddRow(CndtGroup.Slider, -7)

Components/IconModules/IconModule_Texts/Config.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -738,11 +738,11 @@
738738

739739
self:SetTexts(TMW.L["UIPANEL_FONT_SHADOW"], TMW.L["UIPANEL_FONT_SHADOW_DESC"])
740740
self:SetSetting("Shadow")
741+
self:SetMode(self.MODE_ADJUSTING)
741742
self:SetMinMaxValues(0, math.huge)
742743
self:SetRange(3)
743744
self:SetValueStep(0.1)
744745
self:SetWheelStep(0.5)
745-
self:SetMode(self.MODE_ADJUSTING)
746746

747747
self:SetTextFormatter(TMW.C.Formatter.PIXELS, TMW.C.Formatter.F_0)
748748
</OnLoad>
@@ -817,10 +817,10 @@
817817

818818
self:SetTexts(TMW.L["UIPANEL_FONT_WIDTH"], TMW.L["UIPANEL_FONT_WIDTH_DESC"])
819819
self:SetSetting("Width")
820+
self:SetMode(self.MODE_ADJUSTING)
820821
self:SetMinMaxValues(0, math.huge)
821822
self:SetRange(100)
822823
self:SetValueStep(1)
823-
self:SetMode(self.MODE_ADJUSTING)
824824

825825
local formatter = TMW.C.Formatter:New(function(value)
826826
if value == 0 then
@@ -846,10 +846,10 @@
846846

847847
self:SetTexts(TMW.L["UIPANEL_FONT_HEIGHT"], TMW.L["UIPANEL_FONT_HEIGHT_DESC"])
848848
self:SetSetting("Height")
849+
self:SetMode(self.MODE_ADJUSTING)
849850
self:SetMinMaxValues(0, math.huge)
850851
self:SetRange(100)
851852
self:SetValueStep(1)
852-
self:SetMode(self.MODE_ADJUSTING)
853853

854854
local formatter = TMW.C.Formatter:New(function(value)
855855
if value == 0 then

Components/IconViews/Bar/Config.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@
6868
self:SetTexts(TMW.L["UIPANEL_BAR_PADDING"], TMW.L["UIPANEL_BAR_PADDING_DESC"])
6969
self:SetSetting("Padding")
7070

71+
self:SetMode(self.MODE_ADJUSTING)
7172
self:SetMinMaxValues(0, math.huge)
7273
self:SetRange(10)
73-
self:SetMode(self.MODE_ADJUSTING)
7474
self:SetValueStep(0.1)
7575
self:SetWheelStep(0.5)
7676

Options/CHANGELOG.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ TMW.CHANGELOG = [==[
88
### Bug Fixes
99
* Fixed an error with the `[Name]` DogTag breaking when LibDogTag-Unit gets upgraded after TMW loads.
1010
* Fixed incorrect labels on Text Display editboxes after changing an icon's text layout.
11+
* Fixed #1868 - Lua errors and broken sliders in WoW 9.0.5.
1112
1213
## v9.0.4
1314
* New Condition: Torghast Anima Power Count

Options/TellMeWhen_Options.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2396,7 +2396,7 @@ TMW:NewClass("Config_Slider", "Slider", "Config_Frame")
23962396
self.max = max
23972397

23982398
if self.mode == self.MODE_STATIC then
2399-
self:SetMinMaxValues_base(min, max)
2399+
self:SetMinMaxValues_base(math.max(min, -10e10), math.min(max, 10e10))
24002400
elseif not self.EditBoxShowing then
24012401
self:UpdateRange()
24022402
end
@@ -2705,7 +2705,7 @@ TMW:NewClass("Config_Slider", "Slider", "Config_Frame")
27052705

27062706
self:SetMinMaxValues_base(newmin, newmax)
27072707
else
2708-
self:SetMinMaxValues_base(self.min, self.max)
2708+
self:SetMinMaxValues_base(math.max(self.min, -10e10), math.min(self.max, 10e10))
27092709
end
27102710
end,
27112711

0 commit comments

Comments
 (0)