From 576df18b07d9bb7622f11e5638232b2d9336353b Mon Sep 17 00:00:00 2001 From: Openarl Date: Fri, 4 Nov 2016 15:21:43 +1000 Subject: [PATCH] Release 1.2.3 - Fixed an error in the Calcs tab --- Classes/CalcBreakdownControl.lua | 10 ++++--- Classes/CalcsTab.lua | 50 ++++++++++++++++---------------- README.md | 3 ++ changelog.txt | 2 ++ manifest.xml | 8 ++--- 5 files changed, 40 insertions(+), 33 deletions(-) diff --git a/Classes/CalcBreakdownControl.lua b/Classes/CalcBreakdownControl.lua index 15b1248b..2a3151d2 100644 --- a/Classes/CalcBreakdownControl.lua +++ b/Classes/CalcBreakdownControl.lua @@ -291,10 +291,12 @@ function CalcBreakdownClass:AddModSection(sectionData) -- Modifier is from an item, add item name and tooltip local itemId = row.mod.source:match("Item:(%d+):.+") local item = build.itemsTab.list[tonumber(itemId)] - row.sourceName = data.colorCodes[item.rarity]..item.name - row.sourceNameTooltip = function() - build.itemsTab:AddItemTooltip(item, row.mod.sourceSlot) - return data.colorCodes[item.rarity], true + if item then + row.sourceName = data.colorCodes[item.rarity]..item.name + row.sourceNameTooltip = function() + build.itemsTab:AddItemTooltip(item, row.mod.sourceSlot) + return data.colorCodes[item.rarity], true + end end elseif sourceType == "Tree" then -- Modifier is from a passive node, add node name, and add node ID (used to show node location) diff --git a/Classes/CalcsTab.lua b/Classes/CalcsTab.lua index 6212a0ad..1980d4fc 100644 --- a/Classes/CalcsTab.lua +++ b/Classes/CalcsTab.lua @@ -95,7 +95,7 @@ Effective DPS: Curses and enemy properties (such as resistances and status condi end section.controls.mainSkill.enabled = #mainSocketGroup.displaySkillList > 1 if mainSocketGroup.displaySkillList[1] then - local activeGem = mainSocketGroup.displaySkillList[mainSocketGroup.mainActiveSkill].activeGem + local activeGem = mainSocketGroup.displaySkillList[self.input.skill_activeNumber].activeGem if activeGem and activeGem.data.parts and #activeGem.data.parts > 1 then section.controls.mainSkillPart.shown = true wipeTable(section.controls.mainSkillPart.list) @@ -182,30 +182,6 @@ function CalcsTabClass:Draw(viewPort, inputEvents) self.width = viewPort.width self.height = viewPort.height - for id, event in ipairs(inputEvents) do - if event.type == "KeyDown" then - if event.key == "z" and IsKeyDown("CTRL") then - self:Undo() - self.build.buildFlag = true - elseif event.key == "y" and IsKeyDown("CTRL") then - self:Redo() - self.build.buildFlag = true - end - end - end - self:ProcessControlsInput(inputEvents, viewPort) - for id, event in ipairs(inputEvents) do - if event.type == "KeyUp" then - if event.key == "WHEELDOWN" then - self.controls.scrollBar:Scroll(1) - elseif event.key == "WHEELUP" then - self.controls.scrollBar:Scroll(-1) - end - end - end - - main:DrawBackground(viewPort) - -- Arrange the sections local baseX = viewPort.x + 4 local baseY = viewPort.y + 4 @@ -282,6 +258,30 @@ function CalcsTabClass:Draw(viewPort, inputEvents) section:UpdatePos() end + for id, event in ipairs(inputEvents) do + if event.type == "KeyDown" then + if event.key == "z" and IsKeyDown("CTRL") then + self:Undo() + self.build.buildFlag = true + elseif event.key == "y" and IsKeyDown("CTRL") then + self:Redo() + self.build.buildFlag = true + end + end + end + self:ProcessControlsInput(inputEvents, viewPort) + for id, event in ipairs(inputEvents) do + if event.type == "KeyUp" then + if event.key == "WHEELDOWN" then + self.controls.scrollBar:Scroll(1) + elseif event.key == "WHEELUP" then + self.controls.scrollBar:Scroll(-1) + end + end + end + + main:DrawBackground(viewPort) + if not self.displayPinned then self.displayData = nil end diff --git a/README.md b/README.md index ff72250b..e8065080 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,9 @@ Head over to the [Releases](https://github.com/Openarl/PathOfBuilding/releases) ![ss3](https://cloud.githubusercontent.com/assets/19189971/18089780/f0ff234a-6f04-11e6-8c88-6193fe59a5c4.png) ## Changelog +### 1.2.3 - 2016/11/04 + * Fixed an error in the Calcs tab + ### 1.2.2 - 2016/11/04 * Fixed interaction between Lioneye's Fall and Serpent Stance * Added support for the Cast on Critical Strike gem (just the gem, no special calculations for CoC yet) diff --git a/changelog.txt b/changelog.txt index 75b48116..9ec9d0b8 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,5 @@ +VERSION[1.2.3][2016/11/04] + * Fixed an error in the Calcs tab VERSION[1.2.2][2016/11/04] * Fixed interaction between Lioneye's Fall and Serpent Stance * Added support for the Cast on Critical Strike gem (just the gem, no special calculations for CoC yet) diff --git a/manifest.xml b/manifest.xml index d218ad32..fae8e12a 100644 --- a/manifest.xml +++ b/manifest.xml @@ -1,18 +1,18 @@ - + - + - + - +