diff --git a/src/Classes/GemSelectControl.lua b/src/Classes/GemSelectControl.lua index 552cff7bd6..15698930bf 100644 --- a/src/Classes/GemSelectControl.lua +++ b/src/Classes/GemSelectControl.lua @@ -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 diff --git a/src/Classes/SkillsTab.lua b/src/Classes/SkillsTab.lua index 117f19ed1b..8ad0c14204 100644 --- a/src/Classes/SkillsTab.lua +++ b/src/Classes/SkillsTab.lua @@ -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 @@ -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()