Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/Classes/GemSelectControl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,9 @@ end

function GemSelectClass:UpdateGem(setText, addUndo)
local gemId = self.list[m_max(self.selIndex, 1)]
if self.buf:match("%S") and self.gems[gemId] then
local bufMatchesGem = (self.gems[gemId] and self.buf:lower() == self.gems[gemId].name:lower()) -- currently only for imbued GemControl: don't process unless the buffer equals an actual gem, whether typed, clicked, or navigated with arrows

if self.gems[gemId] and (not self.imbuedSelect or bufMatchesGem) then
self.gemId = gemId
else
self.gemId = nil
Expand Down
8 changes: 5 additions & 3 deletions src/Classes/SkillsTab.lua
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,14 @@ local SkillsTabClass = newClass("SkillsTab", "UndoHandler", "ControlHost", "Cont
self.controls.imbuedSupport.inactiveCol = data.skillColorMap[gem.grantedEffect.color]
self.build.buildFlag = true
else
local cleanUp = self.imbuedSupportBySlot[targetSlot]
self.imbuedSupportBySlot[targetSlot] = nil
if updateDisplayGroup then
self.displayGroup.imbuedSupport = nil
end
if cleanUp then -- an imbued existed before clearing it, so reprocess
self.build.buildFlag = true
end
end
end, true, true)
local function isImbuedEnabled() -- socketedIn must be set and the displayGroup must have an imbued, otherwise disable the imbued dropdown
Expand All @@ -251,9 +255,7 @@ local SkillsTabClass = newClass("SkillsTab", "UndoHandler", "ControlHost", "Cont
self.controls.imbuedSupportClear = new("ButtonControl", { "LEFT", self.controls.imbuedSupportLabel, "RIGHT" }, { 260, 0, 20, 20}, "x", function()
self.controls.imbuedSupport.gemId = nil
self.controls.imbuedSupport:SetText("")
self.displayGroup.imbuedSupport = nil
self.imbuedSupportBySlot[self.displayGroup.slot] = nil
self.build.buildFlag = true
self.controls.imbuedSupport:gemChangeFunc(nil)
end)
self.controls.imbuedSupportClear.enabled = function()
return isImbuedEnabled()
Expand Down
Loading