Skip to content

Commit

Permalink
Hide the power report on loading a build and unchecking "Show node po…
Browse files Browse the repository at this point in the history
…wer" (PathOfBuildingCommunity#5932)

* Close power report when disabling node power

* Don't save or load show node power
  • Loading branch information
Lilylicious authored and Dullson committed Dec 6, 2023
1 parent a64ba0d commit 172471a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/Classes/PassiveTreeView.lua
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,6 @@ function PassiveTreeViewClass:Load(xml, fileName)
if xml.attrib.searchStr then
self.searchStr = xml.attrib.searchStr
end
if xml.attrib.showHeatMap then
self.showHeatMap = xml.attrib.showHeatMap == "true"
end
if xml.attrib.showStatDifferences then
self.showStatDifferences = xml.attrib.showStatDifferences == "true"
end
Expand All @@ -89,7 +86,6 @@ function PassiveTreeViewClass:Save(xml)
zoomX = tostring(self.zoomX),
zoomY = tostring(self.zoomY),
searchStr = self.searchStr,
showHeatMap = tostring(self.showHeatMap),
showStatDifferences = tostring(self.showStatDifferences),
}
end
Expand Down
5 changes: 5 additions & 0 deletions src/Classes/TreeTab.lua
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,11 @@ local TreeTabClass = newClass("TreeTab", "ControlHost", function(self, build)
self.controls.treeHeatMap = new("CheckBoxControl", { "LEFT", self.controls.findTimelessJewel, "RIGHT" }, 130, 0, 20, "Show Node Power:", function(state)
self.viewer.showHeatMap = state
self.controls.treeHeatMapStatSelect.shown = state

if state == false then
self.showPowerReport = false
self:TogglePowerReport()
end
end)
self.controls.treeHeatMapStatSelect = new("DropDownControl", { "LEFT", self.controls.treeHeatMap, "RIGHT" }, 8, 0, 150, 20, nil, function(index, value)
self:SetPowerCalc(value)
Expand Down

0 comments on commit 172471a

Please sign in to comment.